mirror of https://github.com/seebye/ueberzug
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
741 B
YAML
21 lines
741 B
YAML
name: Pull request closer
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [opened,reopened]
|
|
jobs:
|
|
close-fork-pull-request:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.head.repo.full_name != github.repository
|
|
steps:
|
|
- name: close pull request
|
|
run: |
|
|
pull_request_id='${{ github.event.pull_request.number }}'
|
|
echo closing pull request "${pull_request_id}" in repository "${GITHUB_REPOSITORY}"
|
|
curl \
|
|
--request PATCH \
|
|
--header "Accept: application/vnd.github.v3+json" \
|
|
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
|
|
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/pulls/${pull_request_id}" \
|
|
--data '{"state":"closed"}'
|