-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not repeat custom copr restriction message #1716
Do not repeat custom copr restriction message #1716
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
The failing openshift tests are my fault, sorry, I'm working on the fix. |
This comment was marked as outdated.
This comment was marked as outdated.
61e0536
to
c46e73e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Build succeeded. ✔️ pre-commit SUCCESS in 1m 42s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -393,6 +393,7 @@ def run(self) -> TaskResults: | |||
status_reporter = StatusReporter.get_instance( | |||
project=self.project, | |||
commit_sha=self.data.commit_sha, | |||
packit_user=self.service_config.get_github_account_name(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please check what is the account name? IIRC it might be prefixed with app/
, but on GitLab, we »do not« have that prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if I follow what you mean by the app/
prefix. The method just returns one of packit-as-a-service[bot]
, packit-as-a-service-stg[bot]
, packit-as-a-service-dev[bot]
depending on the deployment used. This should match the commenter name in the Github PRs/commits
class DuplicateCheckMode(Enum): | ||
"""Enum of possible behaviour for handling duplicates when commenting.""" | ||
|
||
# Do not check for duplicates | ||
do_not_check = auto() | ||
# Check only last comment from us for duplicate | ||
check_last_comment = auto() | ||
# Check the whole comment list for duplicate | ||
check_all_comments = auto() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if we want to switch between the modes and don't be consistent but I like it after all..;) really nicely implemented!
Deprecate CommitComment.comment in favour of body Related to packit/packit-service#1716 RELEASE NOTES BEGIN CommitComment.comment has been deprecated in favour of CommitComment.body to make the naming consistent across objects. RELEASE NOTES END Reviewed-by: Laura Barcziová <None> Reviewed-by: None <None>
Signed-off-by: František Nečas <[email protected]>
c46e73e
to
f3557eb
Compare
Updated the access to commit's comment body to match packit/ogr#748 . |
Build failed. ❌ pre-commit POST_FAILURE in 1m 46s |
recheck |
Build succeeded. ✔️ pre-commit SUCCESS in 1m 53s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely done!
Build succeeded (gate pipeline). ✔️ pre-commit SUCCESS in 1m 46s |
Some slight refactoring of duplicate message check into status reporter using an optional argument + then using it in appropriate places.
TODO:
Fixes #1686
RELEASE NOTES BEGIN
Packit now won't repeatedly comment in pull requests about the need to migrate configuration of allowed forge projects to Copr.
RELEASE NOTES END