diff options
author | Giteabot <teabot@gitea.io> | 2023-09-20 17:49:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-20 11:49:58 +0200 |
commit | 7a99c7b83c0c1b6002ab6ff43000cd928b791643 (patch) | |
tree | 29ccd5163e016a284bf2dbdca67913dfcd926ee7 | |
parent | 1d6e5c8e5862e634081c943f346003c36e47415f (diff) | |
download | gitea-7a99c7b83c0c1b6002ab6ff43000cd928b791643.tar.gz gitea-7a99c7b83c0c1b6002ab6ff43000cd928b791643.zip |
Improve actions docs related to `pull_request` event (#27126) (#27145)
Backport #27126 by @Zettat123
Related to #27039
The `ref` property in Gitea Actions is different from GitHub Actions.
This PR improves the documentation to explain the difference.
Co-authored-by: Zettat123 <zettat123@gmail.com>
-rw-r--r-- | docs/content/usage/actions/faq.en-us.md | 3 | ||||
-rw-r--r-- | docs/content/usage/actions/faq.zh-cn.md | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/docs/content/usage/actions/faq.en-us.md b/docs/content/usage/actions/faq.en-us.md index 031509a033..1d59872936 100644 --- a/docs/content/usage/actions/faq.en-us.md +++ b/docs/content/usage/actions/faq.en-us.md @@ -180,3 +180,6 @@ For events supported only by GitHub, see GitHub's [documentation](https://docs.g | pull_request_review_comment | `created`, `edited` | | release | `published`, `edited` | | registry_package | `published` | + +> 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. +> 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. diff --git a/docs/content/usage/actions/faq.zh-cn.md b/docs/content/usage/actions/faq.zh-cn.md index f5dc8e179b..7bb79d02fc 100644 --- a/docs/content/usage/actions/faq.zh-cn.md +++ b/docs/content/usage/actions/faq.zh-cn.md @@ -180,3 +180,6 @@ defaults: | pull_request_review_comment | `created`, `edited` | | release | `published`, `edited` | | registry_package | `published` | + +> 对于 `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。 +> 因此,Gitea Actions 中 `ref` 是 `refs/pull/:prNumber/head`,它指向这个拉取请求的头分支而不是合并提交的预览。 |