Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extracting logs from job URLs that have ?pr=123 query string #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

huonw
Copy link

@huonw huonw commented Mar 7, 2025

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 like 38231106711?pr=245 (retaining the query string) which didn't work with the rest of the code. This new version uses net/url to ensure the code is working with the URL's path alone, ignoring any extraneous data like ?queries or #fragments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant