diff --git a/data/reusables/actions/ref-description.md b/data/reusables/actions/ref-description.md index cf8dcf39a5ab..99b3425ba700 100644 --- a/data/reusables/actions/ref-description.md +++ b/data/reusables/actions/ref-description.md @@ -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 branch it was merged into. 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/`. For pull request events except `pull_request_target` that were not merged, it is `refs/pull//merge`. `pull_request_target` events have the `ref` from the base branch. For tags it is `refs/tags/`. For example, `refs/heads/feature-branch-1`. For more information about pull request merge branches, see [AUTOTITLE](/pull-requests/reference/pull-requests#pull-request-refs-and-merge-branches). +The fully-formed ref of the branch or tag that triggered the workflow run. The value depends on the event:

For a `push` event, this is the branch or tag ref that was pushed. For a `pull_request` event that was not merged, this is the pull request merge branch (`refs/pull//merge`). If the pull request was merged, this is the branch it was merged into (`refs/heads/`). For a `pull_request_target` event, this is the ref from the base branch. For a `release` event, this is the release tag created. For other events, this is the branch or tag ref that triggered the workflow run.

This property is only set if a branch or tag is available for the event type. Branch refs use `refs/heads/` and tag refs use `refs/tags/`. For more information about pull request merge branches, see [AUTOTITLE](/pull-requests/reference/pull-requests#pull-request-refs-and-merge-branches).