Skip to content

fix: sign the terminology sync commit so the pull request can be merged (CLIM-1705) - #970

Merged
ivargr merged 1 commit into
masterfrom
fix/sign-terminology-sync-commit
Dec 4, 2026
Merged

ivargr merged 1 commit into
masterfrom
fix/sign-terminology-sync-commit

Conversation

@ivargr

@ivargr ivargr commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The first pull request from the Sync terminology workflow (#960) could not be merged without bypassing the rules. Its commit was unsigned, and master requires signed commits.

The workflow made the commit through the GitHub API with TERMINOLOGY_SYNC_TOKEN. GitHub signs a commit made through the API only for the default Actions token or a GitHub App, not for a personal token, so the comment in the workflow was wrong.

The workflow now uses two tokens:

  • The default token creates the sync branch and makes the commit, so GitHub signs it.
  • TERMINOLOGY_SYNC_TOKEN still lists and opens the pull request, so CI starts on it.

A commit made with the default token starts no workflow. When the workflow adds a commit to a sync pull request that is already open, it therefore closes and reopens the pull request to start CI on the new commit.

Review needed

Review needed: quick-merge

Test plan

Not run: the workflow reads its own file from master and does nothing while the copy is up to date. After the merge, the next change to terminology.yaml in dhis2-chap/user-stories shows whether the sync commit is verified and the pull request merges without a bypass.

@ivargr
ivargr marked this pull request as ready for review December 4, 2026 13:44
if [ -n "$pr" ]; then
# The commit started no CI on the open pull request. Reopening it does.
gh pr close "$pr" --repo "$repo"
gh pr reopen "$pr" --repo "$repo"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Side effect: claude-pr-review.yml triggers on pull_request: types: [..., reopened], so every sync update to an open PR also starts a new (billed) Claude review of a quick-merge terminology PR. If that is not wanted, skip the review for this branch (e.g. if: github.head_ref != 'chore/sync-terminology'). Also, when the secret is missing and GH_TOKEN falls back to github.token, the close/reopen starts no CI, so it does nothing useful. That is harmless, but the comment at the top of the file does not say so.

@claude

claude Bot commented Dec 4, 2026

Copy link
Copy Markdown

No significant findings. The two-token split matches GitHub's signing behaviour. The default token has contents: write at job level, and the CI workflows run on reopened by default.

  • Minor: close/reopen also triggers claude-pr-review.yml (it listens on reopened) on every sync update (inline comment).

Verdict: safe to merge.

@ivargr
ivargr merged commit 433f0ce into master Dec 4, 2026
16 checks passed
@ivargr
ivargr deleted the fix/sign-terminology-sync-commit branch December 4, 2026 13:45
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.

1 participant