Files
grm/.gitea/workflows/auto-merge.yml
T

35 lines
1.1 KiB
YAML

name: Auto-merge
on:
pull_request:
types: [labeled, unlabeled]
jobs:
merge:
# Always run — the Python script checks for the label via API.
# Gitea's `labeled` event payload may not populate pull_request.labels
# correctly, so we can't rely on the YAML-level condition.
if: github.event.label.name == 'ready-to-merge'
runs-on: docker
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install --break-system-packages requests python-dotenv click
- name: Squash merge with task ID
env:
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
VIKUNJA_TOKEN: ${{ secrets.VIKUNJA_TOKEN }}
PYTHONPATH: src
HEAD_REF: ${{ github.head_ref }}
PR_TITLE: ${{ github.event.pull_request.title }}
REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.number }}
run: |
python3 scripts/ci/auto_merge.py \
"$HEAD_REF" \
"$PR_TITLE" \
"$REPOSITORY" \
"$PR_NUMBER" \
"ready-to-merge"