Conversation
Validate Commit Subjects only makes sense pre-merge (should this PR be mergeable) - by the time main.yaml's validate job runs, the commits are already merged, so re-checking their subjects is meaningless. Test still re-runs post-merge (verifies the actual merge result); commit- subject validation no longer does, via a new skip_commit_validation workflow_call input on ci.yaml. Closes #40. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the post-merge workflow (main.yaml) to avoid re-running commit-subject validation after a PR is already merged, while keeping the reusable CI workflow (ci.yaml) behavior unchanged for its normal pre-merge triggers.
Changes:
- Add a
skip_commit_validationboolean input to the reusable CI workflow (ci.yaml) with a default offalse. - Gate the “Validate Commit Subjects” job in
ci.yamlbehindif: inputs.skip_commit_validation != true. - Pass
skip_commit_validation: truefrommain.yamlwhen invoking the reusable CI workflow post-merge.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/main.yaml | Passes skip_commit_validation: true when calling the reusable CI workflow in the post-merge validations job. |
| .github/workflows/ci.yaml | Introduces a workflow_call input and uses it to conditionally skip the commit-subject validation job. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes #40.
main.yaml'svalidatejob callsci.yamlas a reusable workflow, running bothTestandValidate Commit Subjectspost-merge. The commit-subject check only makes sense pre-merge (should this PR be mergeable) - by the timemain.yamlruns, the commits are already merged, so re-checking their subjects is meaningless.Teststill re-runs post-merge (verifies the actual merge result); commit-subject validation no longer does.Added a
skip_commit_validationworkflow_callinput onci.yaml(defaultfalse, so its ownpull_request/workflow_dispatchtriggers are unaffected), andmain.yaml'svalidatejob now passesskip_commit_validation: true.Test plan
ruby -ryamlif: inputs.skip_commit_validation != trueexpression safely defaults to running the job for every trigger type that doesn't explicitly pass the input (pull_request, workflow_dispatch) -inputs.skip_commit_validationevaluates tonullthere, andnull != trueistrue