rusackas opened a new pull request, #40543:
URL: https://github.com/apache/superset/pull/40543

   ### SUMMARY
   
   The \"Congrats on your first PR\" workflow fires on **every** PR from 
returning contributors, including org members.
   
   **Root cause:** `actions/first-interaction@v3` detects first-time 
contributors by querying the GitHub API for prior PRs, but the job's 
`permissions` block only grants `pull-requests: write`. That restricted token 
cannot list the repo's PR history, so the action silently falls back to 
treating every PR as a first — even from someone with hundreds of merged PRs.
   
   **Fix:** Add a job-level `if` condition gating on 
`github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'`. 
GitHub computes `author_association` server-side before the workflow runs, so 
it's authoritative with no API calls required. The action only runs (and posts 
the comment) when GitHub itself confirms the author has never had a PR merged 
here.
   
   The `author_association` values for returning contributors (`MEMBER`, 
`COLLABORATOR`, `CONTRIBUTOR`) all correctly skip the job.
   
   ### TESTING INSTRUCTIONS
   
   - Open a PR as an org member → workflow job skips (condition false), no 
comment posted ✓
   - Open a PR as a brand-new GitHub user with no prior contributions → 
workflow runs and posts the welcome comment ✓
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue
   - [ ] Required feature flags
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to