Skip to content

Conversation

mhucka
Copy link
Member

@mhucka mhucka commented Aug 29, 2025

gh pr view can take the PR info in a number of ways, but does not recognize the URLs produced by ${{github.event.pull_request.url}} as being a pull request URL. This reuslts in failures like the one in #889.

This workflow was working before. Something must have changed – perhaps a version update to gh changed the behavior. In any case, one straightforward way to resolve it is to give it a PR number instead of a URL.

If a PR number is given, though, then gh also needs to be told which repository the PR number refers to. gh would normally get this info from the current repo where it's executing, but since for efficiency we skip doing a git check-out for that step, it needs to be told explicitly. A simple solution is to set the $GH_TOKEN environment variable, which gh uses if it's defined.

mhucka added 2 commits August 29, 2025 20:48
Unless executed in a git repository, `gh` no longer seems to get
information about the current repo where it's executing, which leads to
failures like the one in tensorflow#889. A simple solution is to set the
`$GH_TOKEN` environment variable, which `gh` uses if it's defined.
@mhucka mhucka changed the title Set GH_REPO for the gh CLI tool Fix #889: add missing repo info and fix wrong argument to gh Aug 29, 2025
@mhucka mhucka marked this pull request as ready for review August 29, 2025 22:41
@mhucka mhucka added area/health Involves general matters of project configuration, health, maintenance, and similar concerns area/ci Involves continuous integration workflows and infrastructure labels Aug 30, 2025
@mhucka
Copy link
Member Author

mhucka commented Aug 30, 2025

Closing this, after off-line discussions led us to conclude that the whole workflow should be reverted back to a prior state. PR #892 will revert it.

@mhucka mhucka closed this Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Involves continuous integration workflows and infrastructure area/health Involves general matters of project configuration, health, maintenance, and similar concerns
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant