Skip to content

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

Closed
@crltc

Description

@crltc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtopic/gitea-actionsrelated to the actions of Giteatype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions