Skip to content
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

Fix mismatch between hook events and github event types (#24048) #24091

Merged
merged 3 commits into from
Apr 13, 2023

Commits on Apr 13, 2023

  1. Fix mismatch between hook events and github event types (go-gitea#24048)

    Some workflow trigger events can have multiple activity types, such as
    `issues` and `pull_request`, and user can specify which types can
    trigger the workflow. See GitHub documentation:
    https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
    
    Now some hook events cannot match the workflow trigger events correctly
    because we don't check the activity types. For example,
    `pull_request_label` is an individual hook event. But there isn't a
    `pull_request_label` workflow trigger event, we can only use
    `pull_request` event's `label` activity type. If we don't check the
    activity types, the workflows without the `label` activity type may be
    triggered by the `pull_request_label` event by mistake. We need to
    improve the match logic.
    
    - [x] [`issues`
    ](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues)
    - [x]
    [`issue_comment`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment)
    - [x]
    [`pull_request`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request)
    - [x]
    [`pull_request_review`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review)
    - [x]
    [`pull_request_review_comment`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review_comment)
    - [x]
    [`release`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release)
    - [x]
    [`registry_package`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#registry_package)
    Zettat123 committed Apr 13, 2023
    Configuration menu
    Copy the full SHA
    b99a403 View commit details
    Browse the repository at this point in the history
  2. fix test

    Zettat123 committed Apr 13, 2023
    Configuration menu
    Copy the full SHA
    29652c0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8b76896 View commit details
    Browse the repository at this point in the history