Misleading examples for github.ref
#35215
Labels
actions
This issue or pull request should be reviewed by the docs actions team
content
This issue or pull request belongs to the Docs Content team
needs SME
This proposal needs review from a subject matter expert
waiting for review
Issue/PR is waiting for a writer's review
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context
What part(s) of the article would you like to see updated?
The ref given is fully-formed, meaning that for branches the format is
refs/heads/<branch_name>
, for pull requests it isrefs/pull/<pr_number>/merge
, and for tags it isrefs/tags/<tag_name>
. For example,refs/heads/feature-branch-1
.Additional information
Surely
github.ref
is notrefs/pull/<pr_number>/merge
for an outstanding pull request.My colleague tripped over reading this bit in canonical/operator#1451
The text was updated successfully, but these errors were encountered: