Skip to content

Chore: [AEA-0000] - fix sync copilot workflow#1052

Merged
anthony-nhs merged 1 commit intomainfrom
sync_copilot_2
Apr 1, 2026
Merged

Chore: [AEA-0000] - fix sync copilot workflow#1052
anthony-nhs merged 1 commit intomainfrom
sync_copilot_2

Conversation

@anthony-nhs
Copy link
Copy Markdown
Contributor

Summary

  • Routine Change

Details

  • fix sync copilot workflow

Copilot AI review requested due to automatic review settings April 1, 2026 13:25
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:

AEA-0000

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates repository automation around Copilot instruction syncing and devcontainer maintenance, alongside a few supporting workflow/config tweaks.

Changes:

  • Update the Copilot instructions sync workflow to use a newer action revision and updated input naming.
  • Rework the devcontainer version update workflow to run via a dedicated action instead of a reusable workflow.
  • Adjust repo hygiene automation (new pre-commit commit-signing check, dependabot cooldown changes, and devcontainer attach command removal).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.pre-commit-config.yaml Adds a local hook to enforce commit signing configuration.
.github/workflows/update_dev_container_version.yml Replaces reusable workflow usage with a job that runs an update action.
.github/workflows/sync_copilot.yml Bumps the Copilot instructions sync action revision and updates inputs.
.github/dependabot.yml Increases dependabot cooldown default days from 3 to 7 for multiple ecosystems.
.devcontainer/devcontainer.json Removes postAttachCommand that registered git-secrets AWS/custom rules in the devcontainer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

args:
- -c
- |
if ! git config --get commit.gpgsign | grep -q "true" > /dev/null 2>&1; then
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The commit signing check only matches the literal string "true". Git boolean config values can be set as "1"/"yes"/"on" etc., which would incorrectly fail this hook even though signing is enabled. Consider using git config --bool --get commit.gpgsign (or equivalent) for a reliable boolean check instead of grepping the raw value.

Suggested change
if ! git config --get commit.gpgsign | grep -q "true" > /dev/null 2>&1; then
if [ "$(git config --bool --get commit.gpgsign 2>/dev/null)" != "true" ]; then

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +38
description: Ensures that commits are GPG signed
entry: bash
args:
- -c
- |
if ! git config --get commit.gpgsign | grep -q "true" > /dev/null 2>&1; then
echo "Error: Commit signing is not enabled."
echo "Please enable commit signing with:"
echo " git config commit.gpgsign true"
echo ""
echo "For more information, see: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The hook messaging says commits must be "GPG signed", but GitHub supports SSH commit signing as well; commit.gpgsign=true can be used with non-GPG signing formats depending on user config. To avoid misleading guidance, consider wording this as "commit signing" (or "signed commits") rather than specifically "GPG".

Copilot uses AI. Check for mistakes.
Comment on lines 13 to 15
},
"postAttachCommand": "git-secrets --register-aws; git-secrets --add-provider -- cat /usr/share/secrets-scanner/nhsd-rules-deny.txt",
"mounts": [
"source=${env:HOME}${env:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

Removing the postAttachCommand drops the git-secrets --register-aws and custom deny rules setup. With no other references to these rules in the repo, developers using the devcontainer will no longer have those git-secrets patterns configured, reducing local secret-detection coverage. If this is intentional, consider migrating the rules setup into the pre-commit hook (or another repo-managed bootstrap step) so it remains consistently applied.

Copilot uses AI. Check for mistakes.
Comment on lines 22 to 26
commit-message:
prefix: "Upgrade: [dependabot] - "
cooldown:
default-days: 3
default-days: 7
###################################
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The PR description only mentions fixing the Copilot sync workflow, but this change set also adjusts dependabot cooldowns, adds a new pre-commit hook, updates the devcontainer update workflow, and removes a devcontainer hook. Please update the PR description to reflect these additional changes (or split into separate PRs) to keep review/audit context accurate.

Copilot uses AI. Check for mistakes.
@anthony-nhs anthony-nhs merged commit 4376ca6 into main Apr 1, 2026
19 checks passed
@anthony-nhs anthony-nhs deleted the sync_copilot_2 branch April 1, 2026 13:49
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.

2 participants