chore(github-workflow): Auto PR Title for translation prs (#7483)

This commit is contained in:
Louis Lam
2026-06-05 22:35:46 +08:00
committed by GitHub
parent 8e27fd1925
commit 2372d39b1b
+23 -1
View File
@@ -20,10 +20,32 @@ permissions:
pull-requests: read
jobs:
pr-title:
# Rename common PR titles to follow the format requirements.
auto-title:
if: github.repository == 'louislam/uptime-kuma'
name: Auto Title
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
if (context.payload.pull_request.title === "Translations Update from Weblate") {
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
title: "chore: Translations Update from Weblate"
});
}
pr-title:
if: ${{ github.repository == 'louislam/uptime-kuma' && always() }}
name: Validate PR title follows https://conventionalcommits.org
runs-on: ubuntu-latest
needs: [auto-title]
permissions:
pull-requests: read
steps: