Skip to content

draft: allow merge without 2-person review #3

draft: allow merge without 2-person review

draft: allow merge without 2-person review #3

on:
pull_request:
branches:
- main
name: Functional test
jobs:
build:
name: Test
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch origin ${{ github.base_ref }} --depth=1
- id: check-diff
run: |
diffs=$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep -e "_test.go" -e "\.md" -e "\.github/" -e "examples/" -e "definitions/)
echo "REVIEW_REQUIRED_FILES=\"$diffs\"" >> "$GITHUB_OUTPUT"
[[ "$(echo -n "$diffs" | wc -l)" == "0" ]]
- if: failure()
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '[Review Rquired]\n{{ steps.check-diff.outputs.REVIEW_REQUIRED_FILES }}'
})