Skip to content

Pull request closed event action not triggered upon merge if paths defined #33941

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

Closed
crltc opened this issue Mar 19, 2025 · 1 comment · Fixed by #34106
Closed

Pull request closed event action not triggered upon merge if paths defined #33941

crltc opened this issue Mar 19, 2025 · 1 comment · Fixed by #34106
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/gitea-actions related to the actions of Gitea type/bug
Milestone

Comments

@crltc
Copy link

crltc commented Mar 19, 2025

Description

Issue:

Pull request closed event action not triggered upon merge if paths defined.

Code:

This code works on Github for all scenarios. On Gitea it does not work when "paths" is defined but when omitting the "paths:" option under "on: pull_request:" it does work. It also works when the PR is closed but not merged.

name: actions test
on:
  pull_request:
    types:
      - closed
    paths:
      - 'folder1/**'
jobs:
  Echo:
    name: "Echo"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Echo action
        run: echo "The event type is ${{ github.event.action }}"
      - name: Echo branch
        run: echo "Branch name is ${{ github.head_ref }}"
      - name: Echo pull request merged value
        run: echo "The PR Merged value is ${{ github.event.pull_request.merged }}"

Reproduced on Gitea Demo:

pr#1 uses the "paths:" and did not trigger
pr#2 omits the "paths:" and did trigger

https://demo.gitea.com/crltc/actions-test

Gitea Version

1.23.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu

How are you running Gitea?

Self-hosted Docker

Reproduced on demo.gitea.com

Database

Postgres

@crltc crltc added the type/bug label Mar 19, 2025
@kemzeb kemzeb added the topic/gitea-actions related to the actions of Gitea label Mar 19, 2025
@NeilHanlon
Copy link

++ Just ran into this myself on my instance.

@Zettat123 Zettat123 added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Apr 2, 2025
@lunny lunny added this to the 1.23.7 milestone Apr 2, 2025
@lunny lunny closed this as completed in f94ee4f Apr 3, 2025
Zettat123 added a commit to Zettat123/gitea that referenced this issue Apr 4, 2025
lunny pushed a commit that referenced this issue Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants