Jens-G opened a new pull request, #3855: URL: https://github.com/apache/thrift/pull/3855
JIRA: [THRIFT-6274](https://issues.apache.org/jira/browse/THRIFT-6274) Client: build AGENTS.md §4 does not allow links to AI sessions or conversations in commit messages or pull request text. A `commit-msg` hook only covers the clone it is installed in, and rebased or cherry-picked commits, including GitHub's own rebase, never run it. This adds a check on the pull request itself. `.github/workflows/tool-links.yml` runs on `opened`, `edited`, `reopened` and `synchronize`. It fails when: - a commit the PR adds over its base branch has such a link in its message; - the PR title or description contains one. What counts: a `Claude-Session:`, `Session-Url:`, `Session-Id:` or `Conversation-Url:` trailer at the start of a line, or a Claude Code session URL or ChatGPT conversation URL with an id after the prefix. Text that only names these forms, such as `https://claude.ai/code/session_…` in AGENTS.md or in the description of the PR that added that rule, passes. The match ignores case, so a lower-case `claude-session:` trailer is caught too. The job names only the commit ids, never the matching line, so the check does not copy a link into the public log. It clones with `--filter=tree:0`, which downloads commit objects only, and uses no third-party action. Verified by running the step's script locally under `bash -eo pipefail` with the event values of real PRs: - A PR head whose commits carry a session trailer: fails, names exactly those commits, and the link is not in the output. - The heads of #3854 and #3841: pass, also with the default "Generated with Claude Code" footer in the description. - The PR that added the rule to AGENTS.md, with its own head, title and description: passes. - A title or description with a session or conversation link, or with a `Claude-Session:` trailer line: fails, and the link is not in the output. - A head SHA that cannot be fetched: the step fails instead of passing. - All 13 open PRs, with their own heads, titles and descriptions: none would fail. - zizmor 1.30.1, including `--persona=auditor`, and actionlint 1.7.12: no findings. 🤖 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]
