Skip to content

Conversation

Zettat123
Copy link
Contributor

@Zettat123 Zettat123 commented Mar 21, 2023

Follow #23037
Fix #22598 comment

Workflows with pull_request trigger event can't be triggered by pull_request_sync event. This PR adds the canGithubEventMatch function to check if a Github event can match any Gitea event. If the Github event matches a Gitea event, the related workflows should be triggered.

@Zettat123 Zettat123 added type/bug pr/wip This PR is not ready for review labels Mar 21, 2023
@delvh
Copy link
Member

delvh commented Mar 21, 2023

Wrong fixing issue?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 21, 2023
@Zettat123
Copy link
Contributor Author

Wrong fixing issue?

This PR is to fix a bug mentioned in #22958 (comment). I've updated the description.

@Zettat123 Zettat123 changed the title WIP: Improve workflow event triggers Improve workflow event triggers Mar 22, 2023
@Zettat123 Zettat123 removed the pr/wip This PR is not ready for review label Mar 22, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 22, 2023
@lunny lunny added outdated/backport/v1.19 This PR should be backported to Gitea 1.19 and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 22, 2023
@lunny lunny added this to the 1.19.1 milestone Mar 22, 2023
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 23, 2023
@Zettat123
Copy link
Contributor Author

And could you please add some unit tests for it?

I've added some unit tests in the latest commit, please review again

@Zettat123 Zettat123 requested a review from wolfogre March 23, 2023 02:55
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 23, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 23, 2023
@lunny lunny merged commit e7f0bcf into go-gitea:main Mar 23, 2023
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 23, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Mar 23, 2023
Follow go-gitea#23037 
Fix [go-gitea#22598
comment](go-gitea#22958 (comment))

Workflows with `pull_request` trigger event can't be triggered by
`pull_request_sync` event. This PR adds the `canGithubEventMatch`
function to check if a Github event can match any Gitea event. If the
Github event matches a Gitea event, the related workflows should be
triggered.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Mar 23, 2023
lunny pushed a commit that referenced this pull request Mar 23, 2023
@wolfogre wolfogre linked an issue Mar 24, 2023 that may be closed by this pull request
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 24, 2023
* upstream/main:
  Fix incorrect `HookEventType` of pull request review comments (go-gitea#23650)
  [skip ci] Updated translations via Crowdin
  Fix codeblocks in the cheat sheet (go-gitea#23664)
  Drop migration for ForeignReference (go-gitea#23605)
  Fix new issue/pull request btn margin when it is next to sort (go-gitea#23647)
  A tool to help to backport locales, changes source strings to fix other broken translations (go-gitea#23633)
  Fix incorrect `show-modal` and `show-panel` class (go-gitea#23660)
  Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (go-gitea#23629)
  Check LFS/Packages settings in dump and doctor command (go-gitea#23631)
  Use a general approach to show tooltip, fix temporary tooltip bug (go-gitea#23574)
  Improve workflow event triggers (go-gitea#23613)
  Improve `<SvgIcon>` to make it output `svg` node and optimize performance (go-gitea#23570)
@Zettat123 Zettat123 deleted the fix/pr-sync-action branch March 27, 2023 03:46
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action status check in pr is not updated action cannot be triggered when using on.pull_request
5 participants