~shimon/dismaltc

ref: 461e0617cb03f1d5027af4fbb3da0722791022e9 dismaltc/.github/workflows/guidance.yml -rw-r--r-- 1.2 KiB
461e0617Itoh Shimon re-enable tests. 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: guidance

on:
  pull_request:
    types: opened

jobs:
  comment:
    runs-on: ubuntu-latest
    steps:
    - name: Post comment and close Pull Request
      run: |
        function comment() {
          cat <<EOF
        Thanks for PR! However we accept patches in \
        [other place](https://sr.ht/~shimon/dismaltc) instead of \
        this place. Please see \
        [that](https://sr.ht/~shimon/dismaltc) for the details. \
        You can contribute soon!
        EOF
        }
        function comment_json() {
          echo '{"body": '
          comment | jq --raw-input --slurp --monochrome-output .
          echo '}'
        }
        comment_json | curl --request POST --fail --silent --show-error \
          --url '${{ github.event.pull_request.comments_url }}' \
          --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
          --header 'content-type: application/json' --data @-
        curl --request PATCH --fail --silent --show-error \
          --url '${{ github.event.pull_request.url }}' \
          --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
          --header 'content-type: application/json' \
          --data '{"state": "closed"}'