mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-23 14:14:33 +00:00
Bump `giteabot` to [`v1.5.1`](https://github.com/go-gitea/giteabot/releases/tag/v1.5.1) to label PRs with a `backport/<version>` label that would cherry-pick cleanly onto the latest release branch with `backport/conflict-free`. The backport workflow's concurrency group is now per ref, so release branch pushes can't cancel a pending backport run from `main`. _Written by Claude (Opus 5.5)._
57 lines
2.2 KiB
YAML
57 lines
2.2 KiB
YAML
name: giteabot
|
|
|
|
on:
|
|
# pull_request_target gives this workflow access to GITEABOT_TOKEN on PRs from
|
|
# forks, which the bot needs to write labels, statuses and comments. Safe here
|
|
# because the job only runs a pinned action and never checks out PR HEAD.
|
|
# These PR lifecycle events drive label maintenance, lgtm, and explicit bot
|
|
# actions triggered by relevant label changes.
|
|
pull_request_target: # zizmor: ignore[dangerous-triggers]
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- labeled
|
|
- unlabeled
|
|
- closed
|
|
- review_requested
|
|
- review_request_removed
|
|
# Reviews arrive through giteabot-review because fork PR review runs get no secrets
|
|
workflow_run:
|
|
workflows:
|
|
- giteabot-review
|
|
types:
|
|
- requested
|
|
# Daily housekeeping like locks, stale feedback issues, last calls and milestones
|
|
schedule:
|
|
- cron: "15 3 * * *"
|
|
# Allow maintainers to rerun selected checks manually when debugging bot
|
|
# behavior without waiting for another repository event.
|
|
workflow_dispatch:
|
|
inputs:
|
|
checks:
|
|
description: Comma-separated list of non-backport checks to run
|
|
required: false
|
|
default: backport_branches,backport_conflict_free,labels,lock,feedback,last_call,milestones,lgtm,translation_comment,pr_actions
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: ${{ format('{0}-{1}', github.workflow, github.event_name == 'pull_request_target' && format('pr-{0}', github.event.pull_request.number) || github.event_name == 'workflow_run' && format('review-{0}', github.event.workflow_run.head_sha) || 'maintenance') }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
giteabot:
|
|
if: github.repository == 'go-gitea/gitea' && (github.event_name != 'workflow_run' || github.event.workflow_run.event == 'pull_request_review')
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: write
|
|
statuses: write
|
|
steps:
|
|
- uses: go-gitea/giteabot@15b18fdedd98a80d0968d0bd9db3a9428814b808 # v1.5.1
|
|
with:
|
|
github_token: ${{ secrets.GITEABOT_TOKEN }}
|
|
checks: ${{ github.event.inputs.checks || 'backport_branches,backport_conflict_free,labels,lock,feedback,last_call,milestones,lgtm,translation_comment,pr_actions' }}
|