Skip to content

Fix git checkout for Slack notify workflow#996

Merged
danbarr merged 1 commit into
mainfrom
fix-slack-workflow-git-checkout
Jun 30, 2026
Merged

Fix git checkout for Slack notify workflow#996
danbarr merged 1 commit into
mainfrom
fix-slack-workflow-git-checkout

Conversation

@danbarr

@danbarr danbarr commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Follow-up to #995. Removing id-token: write (#994) fixed Anthropic-auth-unrelated OIDC, but the next run failed with fatal: not a git repository. claude-code-action's restoreConfigFromBase step unconditionally runs git fetch/git checkout against the base branch to restore trusted .claude/.mcp.json config before Claude runs, even in agent mode, and that needs an actual git working tree. This workflow never ran actions/checkout, so there was no .git directory.

Added a checkout step. pull_request_target's default checkout ref (no explicit ref:) is the base branch's HEAD, not the PR head, so this stays consistent with the workflow's existing security model: no PR-supplied code ever lands in the workspace.

Type of change

  • Bug fix (typo, broken link, etc.)

Related issues/PRs

Follow-up to #994 and #995

Submitter checklist

Content and formatting

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and style

Reviewer checklist

Content

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and style

claude-code-action restores trusted .claude/.mcp.json config from
the base branch via git before running Claude, even in agent mode,
which needs a git working tree. Add a checkout step; the default
ref on pull_request_target is the base branch, not the PR head, so
this stays consistent with never running PR-supplied code.
Copilot AI review requested due to automatic review settings June 30, 2026 18:51
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Jun 30, 2026 6:52pm

Request Review

@danbarr
danbarr merged commit 64381c0 into main Jun 30, 2026
4 checks passed
@danbarr
danbarr deleted the fix-slack-workflow-git-checkout branch June 30, 2026 19:11
@danbarr
danbarr removed the request for review from Copilot June 30, 2026 19:43
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