Repository navigation
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 |
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.