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
add black lint workflow #178
Conversation
b7d8d92
to
4c3e356
Compare
@@ -0,0 +1,10 @@ | |||
name: Lint | |||
|
|||
on: [push, pull_request] |
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.
This will trigger duplicate check runs.
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.
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.
This is the recommended config in the black docs.
According to this community post, they are actually testing two independent refs:
The workflow triggered by push and pull_request use different GITHUB_REF. When push to a branch ,the GITHUB_REF of workflow run triggered by push event is the current branch. And workflow run triggered by pull_request event uses refs/pull/:prNumber/merge as its GITHUB_REF.
If I'm reading that right, push
will test the head of the current branch, and pull_request
will test the branch merged into main
?
fix unused imports ignore unused import in manage.py as its used to trigger an ImportError
e4713a0
to
1f9ae6d
Compare
No description provided.