-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Labels
topic/gitea-actionsrelated to the actions of Gitearelated to the actions of Giteatype/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Description
Feature Description
Hi,
I would like to be able to update Status Checks on a label change. (I am not sure if this is supposed to be working like this - as for github)
An example would be a workflow like this:
name: Do Not Merge
on:
# Check label at every push in a feature branch
push:
branches-ignore:
- main
# Check label during the lifetime of a pull request
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
jobs:
do-not-merge:
runs-on: ubuntu-22.04
steps:
- name: Fail if PR is labeled with do not merge
if: contains(github.event.pull_request.labels.*.name, 'do-not-merge')
run: |
echo "This PR can't be merged, due to the 'do-not-merge' label."
exit 1
Having branch rules protection to main (default) branch I would be able to disable merging by adding "do-not-merge" label.
Currently, on 1.23-nightly, the action is run, but status check will show the initial state for the PR. I need to add another commit to the PR to have a new state for the "do not merge" check
Screenshots
No response
Metadata
Metadata
Assignees
Labels
topic/gitea-actionsrelated to the actions of Gitearelated to the actions of Giteatype/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.