You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
circleci-dispatch.yml: gh pr comment/edit fail with 'not a git repository' after successfully triggering CircleCI #516
circleci-dispatch.yml's dispatch job successfully triggers the CircleCI pipeline (the curl to /pipeline/run returns a real pipeline number), but its three follow-up steps — "Comment with the run link", "Comment on failure to trigger", "Remove the triggering label" — all call gh pr comment / gh pr editwithout --repo, and the job has no actions/checkout step. gh falls back to inferring the repo from the local git context, finds none, and fails:
failed to run git: fatal: not a git repository (or any of the parent directories): .git
Net effect: the pipeline does get triggered (verified — got a real pipeline number back), but the PR never gets the comment with the run link, and the circleci-job label never gets removed, so there's no visible confirmation it worked and the label sits there afterward.
Evidence
Triggered via the circleci-job label on PR #512 (2026-08-24): CircleCI returned {"state":"pending",...,"number":271}, but the "Comment with the run link" step then failed with the error above, followed by the same failure on the failure-comment and label-removal steps.
Fix
Add --repo ${{ github.repository }} to all three gh pr comment/gh pr edit calls (cheaper than adding a full checkout, since this job doesn't otherwise need the working tree).
Activity