diff --git a/.github/workflows/claude-copy-to-main.yml b/.github/workflows/claude-copy-to-main.yml index 7bde3941bb8..3905a276fd0 100644 --- a/.github/workflows/claude-copy-to-main.yml +++ b/.github/workflows/claude-copy-to-main.yml @@ -10,6 +10,7 @@ jobs: if: | github.event_name == 'issue_comment' && github.event.issue.pull_request && + github.event.comment.user.login != 'svcnvidia-nemo-ci' && contains(github.event.comment.body, '/claude copy') runs-on: ubuntu-latest permissions: @@ -28,7 +29,7 @@ jobs: run: | PERMISSION=$(gh api repos/$REPO/collaborators/$COMMENTER/permission --jq .permission) if [[ "$PERMISSION" != "admin" && "$PERMISSION" != "write" ]]; then - gh pr comment $PR_NUMBER --repo $REPO --body "❌ You do not have write access to use \`/claude copy\`." + gh pr comment $PR_NUMBER --repo $REPO --body "❌ You do not have write access to use the Claude copy command." exit 1 fi @@ -39,12 +40,12 @@ jobs: PR_MERGED=$(echo "$PR_JSON" | jq -r .mergedAt) if [ "$PR_BASE" = "main" ]; then - gh pr comment $PR_NUMBER --repo $REPO --body "❌ This PR already targets \`main\`. \`/claude copy\` only works on PRs targeting non-main branches." + gh pr comment $PR_NUMBER --repo $REPO --body "❌ This PR already targets \`main\`. The Claude copy command only works on PRs targeting non-main branches." exit 1 fi if [ "$PR_MERGED" = "null" ] || [ -z "$PR_MERGED" ]; then - gh pr comment $PR_NUMBER --repo $REPO --body "❌ This PR has not been merged yet. \`/claude copy\` only works on merged PRs." + gh pr comment $PR_NUMBER --repo $REPO --body "❌ This PR has not been merged yet. The Claude copy command only works on merged PRs." exit 1 fi @@ -110,7 +111,7 @@ jobs: --base main \ --head copy-pr-${PR_NUMBER}-to-main \ --title "[Copy to main] " \ - --body "🤖 **This PR was auto-generated by Claude** via the \`/claude copy\` command.\n\nCherry-picked from #${PR_NUMBER}.\n\n---\n\n" + --body "🤖 **This PR was auto-generated by Claude** via the Claude copy workflow.\n\nCherry-picked from #${PR_NUMBER}.\n\n---\n\n" 8. Comment on the original PR with a link to the newly created PR.