-
Notifications
You must be signed in to change notification settings - Fork 0
Chore: [AEA-0000] - add sync copilot and check commit signing pre-commit hook #2
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||
| name: Sync Copilot Instructions | ||||||
|
|
||||||
| on: | ||||||
| workflow_dispatch: | ||||||
| schedule: | ||||||
| - cron: "0 6 * * 1" | ||||||
|
|
||||||
| jobs: | ||||||
| sync-copilot-instructions: | ||||||
| runs-on: ubuntu-22.04 | ||||||
| environment: create_pull_request | ||||||
| permissions: | ||||||
| contents: read | ||||||
|
|
||||||
| steps: | ||||||
| - name: Sync shared instructions | ||||||
| uses: NHSDigital/eps-copilot-instructions@304ab2f4b7cdc15a1d7c0a0fae5290fad41b2451 | ||||||
| with: | ||||||
| copilot_instructions_ref: main | ||||||
| calling_repo_base_branch: master | ||||||
|
||||||
| calling_repo_base_branch: master | |
| calling_repo_base_branch: main |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -49,8 +49,35 @@ repos: | |||||||||
| types_or: [sh, shell] | ||||||||||
| pass_filenames: false | ||||||||||
|
|
||||||||||
| - repo: local | ||||||||||
| hooks: | ||||||||||
| - id: check-commit-signing | ||||||||||
| name: Check commit signing | ||||||||||
| description: Ensures that commits are GPG signed | ||||||||||
|
Comment on lines
+53
to
+54
|
||||||||||
| name: Check commit signing | |
| description: Ensures that commits are GPG signed | |
| name: Check commit signing configuration | |
| description: Ensures Git is configured to sign commits with GPG |
Copilot
AI
Apr 1, 2026
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.
Failing when user.signingkey is unset will block users who have commit signing working via a default GPG key (or other signing setups) without explicitly setting user.signingkey. This can cause false failures on commit. Prefer checking/enforcing commit.gpgsign (and optionally gpg.format) without requiring user.signingkey, or make the signingkey check conditional/optional.
Copilot
AI
Apr 1, 2026
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.
The commit.gpgsign check relies on grepping raw git config output for the string true. Git boolean configs can be represented in multiple ways and git config --get doesn’t normalize them. Use git config --bool --get commit.gpgsign (or equivalent) and compare the normalized value; also the extra > /dev/null after grep -q is redundant.
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.
Other workflows in this repo set top-level
permissions: {}and then grant per-job permissions. This workflow omits the top-level permissions block, which likely results in broader default token permissions than intended. Addpermissions: {}at the workflow root and keep only the minimal job permissions needed.