mirror of
https://github.com/okxlin/appstore.git
synced 2026-09-25 00:01:02 +00:00
36 lines
1011 B
YAML
36 lines
1011 B
YAML
name: Label third-party PRs
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
add-pending-label:
|
|
if: >
|
|
github.event.pull_request.user.login != 'app/renovate' &&
|
|
github.event.pull_request.user.login != 'renovate[bot]' &&
|
|
!(
|
|
github.event.pull_request.head.repo.full_name == github.repository &&
|
|
(
|
|
startsWith(github.event.pull_request.head.ref, 'renovate/') ||
|
|
startsWith(github.event.pull_request.head.ref, 'selfhosted-renovate/')
|
|
)
|
|
)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Add pending label to third-party PRs
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GH_REPO: ${{ github.repository }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
run: |
|
|
gh api --method POST --silent \
|
|
"repos/${GH_REPO}/issues/${PR_NUMBER}/labels" \
|
|
-f 'labels[]=pending'
|
|
echo 'labels: pending'
|