File: AddPRComment.yml

package info (click to toggle)
azure-cli 2.83.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,346,000 kB
  • sloc: python: 1,930,197; sh: 1,344; makefile: 407; cs: 145; javascript: 74; sql: 37; xml: 21
file content (28 lines) | stat: -rw-r--r-- 812 bytes parent folder | download | duplicates (2)
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
on:
  pull_request_target:
    types: [opened]
    branches:
      - dev
      - release

permissions: {}

jobs:
  thank-user:
    runs-on: ubuntu-latest
    name: Say thanks for the PR
    steps:
      - name: Comment on PR
        env:
          PR_NUMBER: ${{ github.event.pull_request.number }}
          REPO: ${{ github.repository }}
          REPO_TOKEN: ${{ secrets.CLI_BOT }}
        run: |
          message='Thank you for your contribution! We will review the pull request and get back to you soon.'

          # Comment on the PR using GitHub API
          curl -X POST \
            -H "Authorization: token $REPO_TOKEN" \
            -H "Accept: application/vnd.github.v3+json" \
            https://api.github.com/repos/$REPO/issues/$PR_NUMBER/comments \
            -d "{\"body\": \"$message\"}"