diff --git a/.github/workflows/extract-claude-lessons.yml b/.github/workflows/extract-claude-lessons.yml index 98a1da30..e0a7cbf0 100644 --- a/.github/workflows/extract-claude-lessons.yml +++ b/.github/workflows/extract-claude-lessons.yml @@ -25,9 +25,13 @@ permissions: jobs: extract-lessons: + # Gate on the head branch name, not user.login: in this repo Claude Code + # pushes to a `claude/*` branch and a human opens the PR, so the PR's + # `user.login` never contains 'claude'. The branch prefix is the reliable + # signal that Claude touched the PR. if: >- github.event.pull_request.merged == true - && contains(github.event.pull_request.user.login, 'claude') + && startsWith(github.event.pull_request.head.ref, 'claude/') && !startsWith(github.event.pull_request.title, 'chore(claude): learn from') runs-on: ubuntu-latest timeout-minutes: 20