Skip to content

Post a comment per dist-git PR about transition#3012

Merged
centosinfra-prod-github-app[bot] merged 2 commits intopackit:mainfrom
lbarcziova:fedora-ci-tmp-comment
Feb 22, 2026
Merged

Post a comment per dist-git PR about transition#3012
centosinfra-prod-github-app[bot] merged 2 commits intopackit:mainfrom
lbarcziova:fedora-ci-tmp-comment

Conversation

@lbarcziova
Copy link
Member

Fixes #3008

Should look like:
Screenshot 2026-02-19 at 15 36 34

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a one-time informational comment on Fedora dist-git pull requests to notify users about the transition to Packit as the default CI. The implementation correctly checks for existing comments to avoid duplication and handles potential errors gracefully. The changes are well-contained and include TODOs for future removal of this temporary feature.

I've added a couple of suggestions to improve code clarity and test coverage. Overall, this is a good change.

Comment on lines +517 to +519
packit_user = (
"packit" if self.service_config.deployment == Deployment.prod else "packit-stg"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved readability and to make the logic more explicit for all deployment types, consider expanding this ternary operator. This will make it clearer how dev and stg deployments are handled.

            if self.service_config.deployment == Deployment.prod:
                packit_user = "packit"
            else:
                # Both stg and dev deployments use packit-stg
                packit_user = "packit-stg"

Comment on lines +76 to +84
# Mock for CI transition comment
.should_receive("get_comments")
.and_return([])
.once()
.mock()
.should_receive("comment")
.with_args(str)
.once()
.mock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current tests cover the scenario where the transition comment is posted. To ensure complete coverage of the new logic, please consider adding a test case for when the comment already exists. This would involve mocking get_comments() to return a comment matching FEDORA_CI_TRANSITION_COMMENT and asserting that pr.comment() is not called.

@centosinfra-prod-github-app
Copy link
Contributor

Copy link
Member

@majamassarini majamassarini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

I have just two nitpicks that Claude suggested, but I think you can also ignore them.

"- Tests: `/packit-ci test`\n\n"
"- See more in the "
"[retriggering documentation](https://packit.dev/fedora-ci/retriggering).\n\n"
"Questions? Reach us at [#packit:fedora.im](https://matrix.to/#/#packit:fedora.im)\n\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Questions? Reach us at [#packit:fedora.im](https://matrix.to/#/#packit:fedora.im)\n\n"
"Questions? Reach out to us at [#packit:fedora.im](https://matrix.to/#/#packit:fedora.im)\n\n"

Copy link
Member

@nforro nforro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@lachmanfrantisek lachmanfrantisek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Short but contains all the info needed. Thanks!

Co-authored-by: Maja Massarini <2678400+majamassarini@users.noreply.github.com>
@centosinfra-prod-github-app
Copy link
Contributor

@lbarcziova lbarcziova added the mergeit Merge via Zuul label Feb 22, 2026
@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app centosinfra-prod-github-app bot merged commit fb71994 into packit:main Feb 22, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Packit pull requests Feb 22, 2026
@lbarcziova lbarcziova deleted the fedora-ci-tmp-comment branch February 22, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mergeit Merge via Zuul

Projects

Development

Successfully merging this pull request may close these issues.

Create a comment per Fedora dist-git PR with info about CI transition

4 participants