Skip to content
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

Update Status Check on Event #33051

Closed
hwaastad opened this issue Dec 30, 2024 · 1 comment · Fixed by #33117
Closed

Update Status Check on Event #33051

hwaastad opened this issue Dec 30, 2024 · 1 comment · Fixed by #33117
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@hwaastad
Copy link

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

@hwaastad hwaastad added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Dec 30, 2024
@yp05327
Copy link
Contributor

yp05327 commented Jan 6, 2025

Confirmed. GitHub support this situation, but Gitea don't.
See: yp05327/test#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
3 participants