diff --git a/.github/workflows/main-reviewer.yml b/.github/workflows/main-reviewer.yml index 233158c..8f49100 100644 --- a/.github/workflows/main-reviewer.yml +++ b/.github/workflows/main-reviewer.yml @@ -25,29 +25,20 @@ jobs: SANITIZED_REVIEWERS="$SANITIZED_REVIEWERS $(sanitize "$r")" done NEW_REVIEWER=$(jq -r '.requested_reviewer.login' < $GITHUB_EVENT_PATH) - ACTOR=$(jq -r '.sender.login' < $GITHUB_EVENT_PATH) SANITIZED_NEW_REVIEWER=$(sanitize "$NEW_REVIEWER") - SANITIZED_ACTOR=$(sanitize "$ACTOR") echo "REVIEWERS=$(echo "$SANITIZED_REVIEWERS" | xargs)" >> $GITHUB_ENV echo "NEW_REVIEWER=$SANITIZED_NEW_REVIEWER" >> $GITHUB_ENV - echo "ACTOR=$SANITIZED_ACTOR" >> $GITHUB_ENV - name: Determine checklist type id: checklist_type run: | - # Only act if the user requested themselves - if [ "$ACTOR" != "$NEW_REVIEWER" ]; then - echo "SKIP=true" >> $GITHUB_ENV - exit 0 - fi COUNT=$(echo "$REVIEWERS" | grep -c .) if [ "$COUNT" -eq "1" ]; then echo "TEMPLATE=main_rev_checklist.md" >> $GITHUB_ENV - echo "SKIP=false" >> $GITHUB_ENV else echo "TEMPLATE=rev_checklist.md" >> $GITHUB_ENV - echo "SKIP=false" >> $GITHUB_ENV fi + echo "SKIP=false" >> $GITHUB_ENV - name: Prepare checklist if: env.SKIP == 'false' diff --git a/README.md b/README.md index a0042fa..6de7bf9 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ This workflow automatically assigns labels to a PR if the PR edits a specific fi ### 4 - welcome bot app, defined in [config.yml](https://github.com/physiopy/physiopy-test-workflows/blob/master/.github/config.yml) This bot automatically posts welcome and thank you messages when a contributor posts their first issue, first PR, and merges first PR. This is a nice way to welcome and thank new contributors, but also acts as an opportunity to direct them towards the relevant contributor guidelines, as needed. -### 5 - main reviewer checklist (desc to come) +### 5 - reviewer checklists on a PR (description to come once workflow finalised) Example: