-
Notifications
You must be signed in to change notification settings - Fork 63.2k
Closed as not planned
Closed as not planned
Copy link
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamstaleThere is no recent activity on this issue or pull requestThere is no recent activity on this issue or pull requestwaiting for reviewIssue/PR is waiting for a writer's reviewIssue/PR is waiting for a writer's review
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
- https://docs.github.com/en/actions/learn-github-actions/contexts
- https://docs.github.com/en/actions/learn-github-actions/variables
What part(s) of the article would you like to see updated?
The information around github.sha
and GITHUB_SHA
.
Additional information
As discussed in #15302, finding the equivalent of github.sha
in events other than push
is a bit unclear.
Although the clarification in #15482 is welcome, it only clarifies what GITHUB_SHA
will represent, not how to find an equivalent value in different events and contexts.
It would be nice if it were more clearly documented that for pull_request
runs, the equivalent to github.sha
is github.event.pull_request.head.sha
, and for workflow_run
it is github.event.workflow_run.head_sha
. There's probably other events that should have this clarified as well, but those are the two I've stumbled upon during my development.
(Created by the request of @cmwilson21 in #15302 (comment))
ajay-bhargava
Metadata
Metadata
Assignees
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamstaleThere is no recent activity on this issue or pull requestThere is no recent activity on this issue or pull requestwaiting for reviewIssue/PR is waiting for a writer's reviewIssue/PR is waiting for a writer's review