Ingestion: dummy test for link-to-checklist with printing #9
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: link-to-checklist | |
on: | |
workflow_dispatch: | |
pull_request_target: | |
types: [opened] | |
jobs: | |
add-review-checklist: | |
if : ${{ github.event_name == 'pull_request' && github.event.action == 'opened' && startsWith(github.event.pull_request.title, 'ingestion') == true}} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Add review checklist | |
uses: actions/github-script@v6 | |
with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const fs = require('fs'); | |
const review_checklist = fs.readFileSync('.github/ingestion-review-checklist.md', 'utf8'); | |
github.rest.pulls.update({ | |
pull_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: context.payload.pull_request.body + review_checklist, | |
}); |