Skip to content

Commit 9336286

Browse files
authored
Improve actions docs related to pull_request event (#27126)
Related to #27039 The `ref` property in Gitea Actions is different from GitHub Actions. This PR improves the documentation to explain the difference.
1 parent 24a215e commit 9336286

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/content/usage/actions/faq.en-us.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,6 @@ For events supported only by GitHub, see GitHub's [documentation](https://docs.g
180180
| pull_request_review_comment | `created`, `edited` |
181181
| release | `published`, `edited` |
182182
| registry_package | `published` |
183+
184+
> For `pull_request` events, in [GitHub Actions](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request), the `ref` is `refs/pull/:prNumber/merge`, which is a reference to the merge commit preview. However, Gitea has no such reference.
185+
> Therefore, the `ref` in Gitea Actions is `refs/pull/:prNumber/head`, which points to the head of pull request rather than the preview of the merge commit.

docs/content/usage/actions/faq.zh-cn.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,6 @@ defaults:
180180
| pull_request_review_comment | `created`, `edited` |
181181
| release | `published`, `edited` |
182182
| registry_package | `published` |
183+
184+
> 对于 `pull_request` 事件,在 [GitHub Actions](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request) 中 `ref` 是 `refs/pull/:prNumber/merge`,它指向这个拉取请求合并提交的一个预览。但是 Gitea 没有这种 reference。
185+
> 因此,Gitea Actions 中 `ref` 是 `refs/pull/:prNumber/head`,它指向这个拉取请求的头分支而不是合并提交的预览。

0 commit comments

Comments
 (0)