Ma77Ball opened a new pull request, #5222:
URL: https://github.com/apache/texera/pull/5222

   ### What changes were proposed in this PR?
     - Add `.github/workflows/welcome-first-time-contributor.yml`, which posts 
a single welcome comment listing the `/take`, `/untake`, `/sub-issue`, 
`/unsub-issue`, `/parent-issue`, `/unparent-issue`, `/request-review`, and 
`/unrequest-review` commands when a new contributor opens their first issue or 
PR.
     - Detect first-time status with the GitHub search API 
(`repo:<owner>/<repo> is:issue|pr author:<login>`, treating `total_count <= 1` 
as first time). This works uniformly for issues and PRs, whereas 
`author_association` reports `NONE` for someone opening their first issue, and 
would miss them.
     - Trigger on `pull_request_target` (not `pull_request`) so PRs from forks 
still receive the welcome with a write-capable token; restrict permissions to 
`issues: write` and `pull-requests: write`.
     - Make the workflow idempotent via a hidden HTML marker (`<!-- 
texera:welcome-first-time-contributor -->`) embedded in the welcome body and 
checked against existing comments before posting, so workflow re-runs and 
reopen races do not duplicate the welcome. 
     ### Any related issues, documentation, or discussions?
     Closes: #5166
     ### How was this PR tested?
     - Validated the workflow YAML parses cleanly with `python3 -c "import 
yaml; 
yaml.safe_load(open('.github/workflows/welcome-first-time-contributor.yml'))"`.
     - Reviewed logic for the known edge cases: search indexing delay (the `<= 
1` check tolerates both 0, not yet indexed, and 1, only the new item), 
transient `listComments` failure (falls open rather than dropping a genuine 
first-timer's welcome), and Bot guard at the job-level `if`.
     - Runtime behavior cannot be exercised end-to-end locally; will be 
observable on the next first-time issue or PR after merge.
     ### Was this PR authored or co-authored using generative AI tooling?
     Co-Authored with Claude Opus 4.7 in compliance with ASF Guidelines


-- 
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]

Reply via email to