Skip to content

fix(ci): sign the commits this workflow creates - #323

Open
Piccirello wants to merge 2 commits into
mainfrom
fix/sign-workflow-commits
Open

fix(ci): sign the commits this workflow creates#323
Piccirello wants to merge 2 commits into
mainfrom
fix/sign-workflow-commits

Conversation

@Piccirello

@Piccirello Piccirello commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

Makes the workflow that commits in this repo produce signed commits.

Commits created with plain git are unsigned. PostHog is rolling the org-wide "Require signed commits" ruleset out to every repo, and this workflow would be rejected with GH013 once it applies here. Routing the commit through the GitHub API instead means GitHub signs it with its own key, so it lands verified.

Found while inventorying which workflows across the org still create unsigned commits. planetscale/ghcommit-action is the pattern already in use in posthog-js, posthog-roblox, brand, charts and the SDK release fleet.

Changes

The two mirror pushes (PostHog/skills, PostHog/ai-plugin) now commit through the API.

Testing

Not run end to end. The working clones moved from mktemp -d into $GITHUB_WORKSPACE/.skills-push and .ai-plugin-push, because ghcommit-action resolves its repository input relative to the workspace. Both target repos already enforce signing, so these pushes were failing before this change.


Review follow-up (pushed)

  • Both mirror clones are now removed in an if: always() step. They embed the App token in .git/config, and moving them from mktemp -d into $GITHUB_WORKSPACE meant the token stayed readable by every later step in the job.

Known limitation worth a decision before merge

The API commit path cannot set an executable bit. GraphQL FileAddition accepts only path and contents (verified by schema introspection), so a newly mirrored executable file lands as 100644. Whether an existing 100755 file keeps its mode when its contents change is undocumented and I could not confirm it — no PostHog repo currently has an executable file that a ghcommit workflow has ever written.

Blast radius today is two files under the tree this workflow mirrors into PostHog/skills:

  • skills/posthog/all/hooks/skill-reminder.sh
  • skills/team/customer-success/impersonation-toolkit/scripts/impersonate-audit.sh

Both are currently 100755, and both were last written by the old plain-git mirror. If either loses its exec bit, the hook silently stops running. Worth checking the mode on the first real mirror run after this merges.

Commits created with plain git are unsigned and are rejected by the
org-wide signed-commits ruleset. Route them through the GitHub API so
GitHub signs them with its own key.
@Piccirello
Piccirello requested a review from a team as a code owner August 4, 2026 23:16
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci revenue
  • /wizard-ci self-driving

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit

Results will be posted here when complete.

Both clones embed the App token in their remote URL and now sit in the workspace rather than a mktemp dir, so remove them once the mirrors are committed.
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