-
Notifications
You must be signed in to change notification settings - Fork 565
49 lines (47 loc) · 1.53 KB
/
check-ppp-edited.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
39
40
41
42
43
44
45
46
47
48
49
name: Check PPP is updated
on: [workflow_dispatch, pull_request]
jobs:
check-ppp:
runs-on: ubuntu-20.04
steps:
- name: Set up repository
uses: actions/checkout@main
- name: Query GraphQL API
uses: octokit/[email protected]
id: get_latest_prs
with:
query: |
query PRs {
repository(owner: "AY2223S1-CS2103T-W16-2", name: "tp") {
pullRequests(last: 100) {
totalCount
edges {
node {
title
merged
resourcePath
participants(first: 10) {
edges {
node {
login
}
}
}
headRepositoryOwner {
login
}
number
closed
}
}
}
}
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save query data to file
working-directory: ${{ github.workspace }}/cli-test/ppp-checker
run: "echo '${{ steps.get_latest_prs.outputs.data }}' > data.json"
- name: Validate all PRs are included in PPP
working-directory: ${{ github.workspace }}/cli-test/ppp-checker
run: ./check-ppp-is-present.sh ${{ github.event.pull_request.user.login }}