-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the issue_comment
workflow trigger event
#29277
Conversation
Would very much like this to be merged. Makes it possible to utilize branch-deploy action |
I think there are 3 kinds of branches. Default branch, base branch and current branch. |
For those trigger events that should trigger workflows on the base branch (like gitea/services/actions/notifier_helper.go Lines 86 to 89 in 22b8de8
For those trigger events that should only trigger workflows on the default branch, the ref can be empty and it will fall back to the default branch. In this PR, if a event cannot pass the check of |
Maybe it is better to merge similar codes of gitea/services/actions/notifier.go Lines 178 to 219 in 182b9c1
|
Good idea. Done in 9bc944c |
Fix go-gitea#29175 Replace go-gitea#29207 This PR makes some improvements to the `issue_comment` workflow trigger event. 1. Fix the bug that pull requests cannot trigger `issue_comment` workflows 2. Previously the `issue_comment` event only supported the `created` activity type. This PR adds support for the missing `edited` and `deleted` activity types. 3. Some events (including `issue_comment`, `issues`, etc. ) only trigger workflows that belong to the workflow file on the default branch. This PR introduces the `IsDefaultBranchWorkflow` function to check for these events.
Backport #29277 by @Zettat123 Fix #29175 Replace #29207 This PR makes some improvements to the `issue_comment` workflow trigger event. 1. Fix the bug that pull requests cannot trigger `issue_comment` workflows 2. Previously the `issue_comment` event only supported the `created` activity type. This PR adds support for the missing `edited` and `deleted` activity types. 3. Some events (including `issue_comment`, `issues`, etc. ) only trigger workflows that belong to the workflow file on the default branch. This PR introduces the `IsDefaultBranchWorkflow` function to check for these events. Co-authored-by: Zettat123 <zettat123@gmail.com>
* giteaofficial/main: Start to migrate from `util.OptionalBool` to `optional.Option[bool]` (go-gitea#29329) Add slow SQL query warning (go-gitea#27545) Unify organizations header (go-gitea#29248) Frontport changelogs of minor releases (go-gitea#29337) Support SAML authentication (go-gitea#25165) Upgrade to fabric 6 (go-gitea#29334) Don't show third-party JS errors in production builds (go-gitea#29303) Remove bountysource (go-gitea#29330) Remove unnecessary "Str2html" modifier from templates (go-gitea#29319) Ignore the linux anchor point to avoid linux migrate failure (go-gitea#29295) Remove jQuery from the repo commit functions (go-gitea#29230) Remove unnecessary "Safe" modifier from templates (go-gitea#29318) Remove jQuery from the image pasting functionality (go-gitea#29324) Improve the `issue_comment` workflow trigger event (go-gitea#29277) Properly migrate automatic merge GitLab comments (go-gitea#27873) Refactor cmd setup and remove deadcode (go-gitea#29313) small cache when get user id on interation (go-gitea#29296) Discard unread data of `git cat-file` (go-gitea#29297) Don't install playwright twice (go-gitea#29302) # Conflicts: # templates/home.tmpl
Automatically locked because of our CONTRIBUTING guidelines |
Fix #29175
Replace #29207
This PR makes some improvements to the
issue_comment
workflow trigger event.issue_comment
workflowsissue_comment
event only supported thecreated
activity type. This PR adds support for the missingedited
anddeleted
activity types.issue_comment
,issues
, etc. ) only trigger workflows that belong to the workflow file on the default branch. This PR introduces theIsDefaultBranchWorkflow
function to check for these events.