mirror of
https://github.com/iptv-org/iptv
synced 2026-10-22 19:18:28 -04:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.1.0 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/d23441a48e516b6c34aea4fa41551a30e30af803...3d3c42e5aac5ba805825da76410c181273ba90b1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: Validate Label
|
|
on:
|
|
issues:
|
|
types: [labeled]
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository code
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- uses: tibdex/github-app-token@0d49dd721133f900ebd5e0dff2810704e8defbc6 # v1.8.2
|
|
if: ${{ !env.ACT }}
|
|
id: create-app-token
|
|
with:
|
|
app_id: ${{ secrets.APP_ID }}
|
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
|
|
- name: Block self-approval
|
|
if: |
|
|
github.event.label.name == 'approved' &&
|
|
github.actor == github.event.issue.user.login
|
|
env:
|
|
GH_TOKEN: ${{ steps.create-app-token.outputs.token }}
|
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
run: |
|
|
if [ "${{ env.ACT }}" = "true" ]; then
|
|
echo "[MOCK] Post comment: A request cannot be approved by its author."
|
|
echo "[MOCK] Remove label: approved"
|
|
else
|
|
gh issue comment $ISSUE_NUMBER --body "A request cannot be approved by its author."
|
|
gh issue edit $ISSUE_NUMBER --remove-label "approved"
|
|
fi
|
|
|
|
exit 1
|