[CS2103T-W16-2] FoodRem #71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |