Support extracting logs from job URLs that have ?pr=123 query string #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes the extract-from-URL job ID deduction for
roc logs 'https://...'
work when the URL has a query string or other trailing data.This occurs in practice when clicking through to a job from a pull request's UI, e.g. clicking a job on runs-on/runs-on#245 takes one to a URL like https://github.com/runs-on/runs-on/actions/runs/13674250460/job/38231106711?pr=245, note the
?pr=245
, and thus a "simple" copy-paste of those URLs from the UI will have the query strings.The previous version of
extractJobID
would extract a job ID like38231106711?pr=245
(retaining the query string) which didn't work with the rest of the code. This new version usesnet/url
to ensure the code is working with the URL's path alone, ignoring any extraneous data like?queries
or#fragments
.