Skip to content
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

Merged
merged 11 commits into from Dec 23, 2021
Merged

add black lint workflow #178

merged 11 commits into from Dec 23, 2021

Conversation

mwarkentin
Copy link
Owner

No description provided.

@@ -0,0 +1,10 @@
name: Lint

on: [push, pull_request]
Copy link

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.

Copy link

Choose a reason for hiding this comment

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

image

Copy link
Owner Author

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?

.flake8 Outdated Show resolved Hide resolved
@mwarkentin mwarkentin merged commit e747401 into main Dec 23, 2021
@mwarkentin mwarkentin deleted the black-fmt branch December 23, 2021 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants