-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
CI Make linting bot comment only on failure #32804
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
CI Make linting bot comment only on failure #32804
Conversation
|
Thanks a lot for the PR! Looks good at a glance, I'll try to take a closer look next week. Out of curiosity, what is your first-hand feeling about moving to PyGithub, does it simplify the code a bit, or not that much? |
|
Yes it does simplify quite a bit, notably you only have to use your token once to authenticate when creating the |
lesteve
left a comment
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.
Looks nice, thanks!
Co-authored-by: Loïc Estève <[email protected]>
|
Let's merge this since I mentioned it at the last meeting and no-one had strong objections. Let's see if people notice and complain! One small side-effect I thought of: I think you will get a notification on each linting failure with this PR. Before you would get a notification once on the first linting failure and never again. I would go as far as saying this is a feature but let's see if others disagree 😉. |
Co-authored-by: Loïc Estève <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
Reference Issues/PRs
Following the discussion on #32751
What does this implement/fix? Explain your changes.
The linter bot no longer adds a comment when the linting succeeds, it only comments when the linting fails and removes its comment when the linting is fixed.
The code in
build_tools/get_comment.pyis also refactored to use the pyGithub package instead of http requests.Any other comments?
Tested on my fork in FrancoisPgm#5, although it might be tough to see it's working as the comments are now removed.