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

[actions] issue_comment event trigger not firing on pull request comments #29175

Closed
Fratee opened this issue Feb 15, 2024 · 0 comments · Fixed by #29277
Closed

[actions] issue_comment event trigger not firing on pull request comments #29175

Fratee opened this issue Feb 15, 2024 · 0 comments · Fixed by #29277
Labels
Milestone

Comments

@Fratee
Copy link

Fratee commented Feb 15, 2024

Description

issue_comment event trigger is not firing on pull request comments.

The action is starting properly when adding a comment on an issue, but not on a pull request.

name: Collection
run-name:  CommentCollection
on:
  issue_comment:
    types: [created]
defaults:
  run:
    shell: powershell

jobs:
  Dump Gitea Context:
    if: ${{ github.event.issue.pull_request }}
    runs-on: [windows]
    steps:
      - name: Dump Gitea context
        env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$env:GITHUB_CONTEXT"

Gitea Version

1.21.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.41.0.windows.1

Operating System

win 10

How are you running Gitea?

self hosting, command line

Database

SQLite

@lunny lunny added this to the 1.21.6 milestone Feb 17, 2024
lunny pushed a commit that referenced this issue Feb 22, 2024
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.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Feb 22, 2024
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.
silverwind pushed a commit that referenced this issue Feb 22, 2024
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>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants