-
-
Notifications
You must be signed in to change notification settings - Fork 16
ci: run commit-check on every PR, and check the title as it will land #531
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
Merged
+45
−3
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Commit Check | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write # pr-comments writes back to the pull request | ||
|
|
||
| on: | ||
| # Pull requests only, deliberately. | ||
| # | ||
| # A push to main carries the squashed commit, whose subject is the pull | ||
| # request title with " (#N)" appended by GitHub. Checking there re-runs work | ||
| # that already passed, against a subject the author never wrote and cannot | ||
| # shorten — which is how #530 passed review at 75 characters and then failed | ||
| # on main at 82, against a limit of 80. | ||
| # | ||
| # No `paths:` filter either. A subject, a branch name or an author address is | ||
| # wrong regardless of which files the change touches, and the filter on | ||
| # main.yml is why nothing ran on #530 at all: it changed only assets/. | ||
| # | ||
| # `edited` matters: a squash merge turns the title into the commit subject, | ||
| # so retitling a pull request changes what will be committed. | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, edited] | ||
|
|
||
| jobs: | ||
| commit-check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 # full history, so branch and rebase checks can resolve | ||
| # Nothing after checkout needs authenticated git. | ||
| persist-credentials: false | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| # The action rather than a nox session: this repository is what the | ||
| # action installs, so running it here is the project checking itself | ||
| # with the thing users actually run. | ||
| - uses: commit-check/commit-check-action@562a184b2b8e583e757b17eb385bc48370f44547 # v2.13.1 | ||
| with: | ||
| message: true | ||
| branch: true | ||
| author-name: true | ||
| author-email: true | ||
| pr-title: true # the subject a squash merge will commit | ||
| job-summary: true | ||
| pr-comments: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.