From e9a10ca712c79c51037f5c96b8f8e749c98ce060 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Wed, 28 Feb 2024 15:05:43 -0500 Subject: [PATCH] auto pr review (#31626) * auto PR comments * little more * test * update action * cleanup * ensure it only runs once * comment that part out --------- Co-authored-by: Adeeb Shihadeh --- .github/workflows/auto_pr_review.yaml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto_pr_review.yaml b/.github/workflows/auto_pr_review.yaml index abb6c38d6b..0720c1e676 100644 --- a/.github/workflows/auto_pr_review.yaml +++ b/.github/workflows/auto_pr_review.yaml @@ -34,6 +34,25 @@ jobs: already-exists-action: close_this already-exists-comment: "Your PR should be made against the `master` branch" + comment: + runs-on: ubuntu-latest + steps: + - name: comment + uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 + with: + message: | + + Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following: + * Convert your PR to a draft unless it's ready to review + * Read the [contributing docs](https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md) + * Before marking as "ready for review", ensure: + * the goal is clearly stated in the description + * all the tests are passing + * the change is [something we merge](https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md#what-gets-merged) + * include a route or your device' dongle ID if relevant + comment_tag: run_id + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + check-pr-template: runs-on: ubuntu-latest permissions: @@ -41,7 +60,7 @@ jobs: issues: write pull-requests: write actions: read - if: github.event.pull_request.head.repo.full_name != 'commaai/openpilot' + if: false && github.event.pull_request.head.repo.full_name != 'commaai/openpilot' steps: - uses: actions/github-script@v7 with: @@ -91,7 +110,7 @@ jobs: // Utility function to check if a list of checkboxes is a subset of another list of checkboxes isCheckboxSubset = (templateCheckBoxTexts, prTextCheckBoxTexts) => { - // Check if each template checkbox text is a substring of at least one PR checkbox text + // Check if each template checkbox text is a substring of at least one PR checkbox text // (user should be allowed to add additional text) return templateCheckBoxTexts.every((item) => prTextCheckBoxTexts.some((element) => element.includes(item))) }