Skip to content

Commit e1e4109

Browse files
Clarification of the github context variables github.ref and github.ref_name (#41375)
Co-authored-by: Sharra-writes <[email protected]>
1 parent e1f97ec commit e1e4109

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by `push`, this is the branch or tag ref that was pushed. For workflows triggered by `pull_request`, this is the pull request merge branch. For workflows triggered by `release`, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches the format is `refs/heads/<branch_name>`. For pull requests events except `pull_request_target`, it is `refs/pull/<pr_number>/merge`. `pull_request_target` events have the `ref` from the base branch. For tags it is `refs/tags/<tag_name>`. For example, `refs/heads/feature-branch-1`.
1+
The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by `push`, this is the branch or tag ref that was pushed. For workflows triggered by `pull_request` that were not merged, this is the pull request merge branch. If the pull request was merged, this is the head branch. For workflows triggered by `release`, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches the format is `refs/heads/<branch_name>`. For pull requests events except `pull_request_target` that were not merged, it is `refs/pull/<pr_number>/merge`. `pull_request_target` events have the `ref` from the base branch. For tags it is `refs/tags/<tag_name>`. For example, `refs/heads/feature-branch-1`.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on {% data variables.product.prodname_dotcom %}. For example, `feature-branch-1`.<br><br>For pull requests, the format is `<pr_number>/merge`.
1+
The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on {% data variables.product.prodname_dotcom %}. For example, `feature-branch-1`.<br><br>For pull requests that were not merged, the format is `<pr_number>/merge`.

0 commit comments

Comments
 (0)