Update Status Check on Event #13897

Closed
opened 2025-11-02 10:56:32 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @hwaastad on GitHub (Dec 30, 2024).

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

Originally created by @hwaastad on GitHub (Dec 30, 2024). ### 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_
GiteaMirror added the topic/gitea-actionstype/proposal labels 2025-11-02 10:56:32 -06:00
Author
Owner

@yp05327 commented on GitHub (Jan 6, 2025):

Confirmed. GitHub support this situation, but Gitea don't.
See: https://github.com/yp05327/test/pull/9

@yp05327 commented on GitHub (Jan 6, 2025): Confirmed. GitHub support this situation, but Gitea don't. See: https://github.com/yp05327/test/pull/9
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13897