Add link to actual job for the emulator wtf checks#6916
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the manually created "Instrumentation Test app" PR check in the pr-emulator-wtf.yml workflow to include a link back to the actual job page (and its logs). Because GitHub may rewrite details_url for API-created checks absorbed into PR-context check suites, the link is also embedded in output.summary as a reliable fallback. The current job's ID is resolved by querying the Actions jobs API and matching against RUNNER_NAME.
Changes:
- Resolve the current job's numeric ID via the Actions jobs API (matched on
runner_name == RUNNER_NAME), constructing ajob_urlwith a safe fallback to the run URL. - Set
output.summarywith a Markdown deep-link to the emulator.wtf job on both check creation and finalization, switching fromgh api -fflags tojq-built JSON payloads piped via--input -. - Persist
job_urlas a step output so the finalize step can reuse it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The current limitations of the checks API makes that the Instrumentation Test app check doesn't show the real job and does not contains a link to it either. This PR build a link to the Job and add it to the check summary. I didn't do it for the test result because we already have a resume of the run and we could get there using the Instrumentation Test app link if we really want to.
It's not the best but it's best effort to get a usable experience. An issue remains is that if we re-run the Pull Request workflow it duplicates the external checks in the workflow.