mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: 'Spam label'
|
|
|
|
on:
|
|
issues:
|
|
types: [labeled]
|
|
pull_request:
|
|
types: [labeled]
|
|
discussion:
|
|
types: [labeled]
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: write
|
|
discussions: write
|
|
|
|
jobs:
|
|
lock:
|
|
if: ${{ (github.event.label.name == 'spam') && (github.event.action == 'labeled') }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: peter-evans/close-issue@v2
|
|
name: Close Issue
|
|
with:
|
|
close-reason: 'not_planned'
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
- run: gh pr close ${{ github.event.pull_request.html_url }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
name: Close PR
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
- uses: maxkomarychev/[email protected]
|
|
name: Lock PR
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
with:
|
|
token: "${{ secrets.GITHUB_TOKEN }}"
|
|
issue_number: ${{ github.event.number }}
|
|
- uses: OSDKDev/[email protected]
|
|
with:
|
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
name: Lock issue
|
|
if: ${{ github.event_name != 'pull_request' }}
|