Skip to content

Close PR Trigger should be removed in some cases #23222

Closed
@yp05327

Description

@yp05327

Description

I used both push and pull_request in the workflow config yaml file.

on:
  - push
  - pull_request

If you merge a PR, you will get two action tasks:
image

In action_run table, the record is as following:
image

ref name is pr.MergedCommitID, and the event's action is closed

WithRef(pr.MergedCommitID).

It seems that Close PR Event will be triggered, when you merge a PR.
I don't think we need to trigger Close PR Event, as if a PR is closed without merge, this event will also be triggered:
Create a PR and just close it:
image
An action task will start to run:
image
And the action task name will be the latest commit name:
image

If we removed Close PR Trigger, when a PR is merged, the only Push Trigger will work.

Gitea Version

latest

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

build

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions