Skip to content

Ingestion: dummy test for link-to-checklist with printing #9

Ingestion: dummy test for link-to-checklist with printing

Ingestion: dummy test for link-to-checklist with printing #9

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,
});