-
Notifications
You must be signed in to change notification settings - Fork 891
38 lines (35 loc) · 1.09 KB
/
comment.yml
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
36
37
38
name: Comment
on:
pull_request:
jobs:
comment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/setup-go@v4
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: "## API Change Report"
- name: Create the comment body
run: |
set -eux
git clone https://github.com/mongodb/mongo-go-driver
cd mongo-go-driver
git remote add source https://github.com/$GITHUB_ACTOR/mongo-go-driver
git fetch origin $GITHUB_BASE_REF
git fetch source $GITHUB_HEAD_REF
git checkout $GITHUB_HEAD_REF
make api-report
cat api-report.md
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-path: 'mongo-go-driver/api-report.md'
edit-mode: replace