janhoy opened a new pull request, #5309:
URL: https://github.com/apache/solr/pull/5309

   # Description
   
   `Check changelog entry` fails with `gh: Not Found (HTTP 404)` whenever an 
entry filename contains `#`, which is our own `PR#<n>-` / `GITHUB#<n>-` 
convention. The path is interpolated straight into a contents URL, so `#` is 
read as a fragment delimiter and the request truncates to the directory.
   
   Open PRs hitting this:
   
   - #5049 — `PR#5049-docs-site-styling.yml`, currently red
   - #4863 — `PR#4853-update-org-apache-tika-tika-core.yml`
   - #4765 — `PR#4765-improve-java-version-parsing.yml`
   
   The latter two last ran the check before the raw-fetch step landed in #5099, 
so they fail on their next push rather than right now.
   
   # Solution
   
   Fetch each entry by the `contents_url` already returned in the 
`pulls/{n}/files` listing. It is URL-encoded and pinned to the head commit, so 
nothing PR-authored goes into the URL, every other character needing escaping 
is covered too, and `HEAD_SHA` is no longer needed. The loop rejects any URL 
that is not a contents URL for this repository, since `gh api` sends the job's 
token to whatever host it is given.
   
   # Tests
   
   Ran both workflow steps verbatim against the three PRs above. Each `#` entry 
404s on the old URL and fetches on the new one; `validate-changelog-yaml.py` 
then exits 0. Also checked that a PR with no entry still short-circuits, that 
an ordinary `SOLR-…` filename is unaffected, and that the URL guard rejects a 
foreign host. `bash -n` passes on both `run` blocks.
   
   No changelog entry, matching the previous fixes to this workflow (#5099, 
#4941).
   
   ---
   
   AI Assisted: written with Claude Code, reviewed and tested by me.
   


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