From 651e656a34a102dc3b3d88994d53268f61137fe2 Mon Sep 17 00:00:00 2001 From: ServerDummy <63013446+ServerDummy@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:05:57 -0600 Subject: [PATCH 1/6] prbot test lol --- .github/workflows/PR-Review.yml | 57 +++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/PR-Review.yml diff --git a/.github/workflows/PR-Review.yml b/.github/workflows/PR-Review.yml new file mode 100644 index 00000000000000..3cc87c6dc94e1b --- /dev/null +++ b/.github/workflows/PR-Review.yml @@ -0,0 +1,57 @@ +name: PR Review + +on: + pull_request: + branches: [ master ] + +jobs: + review: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Check for template + run: | + # Replace "" with the actual template string + if grep -q "## Pull Request Template" ${{ github.event.pull_request.body }}; then + echo "Template found!" + else + echo "Error: PR template is missing!" + exit 1 + fi + + - name: Set draft status + if: always() + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + state: 'draft' + }) + + - name: Add bot-review label + if: always() + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: ['bot-review'] + }) + + - name: Remove bot-review label + if: always() + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + name: 'bot-review' + }) \ No newline at end of file From 3fcb76542f0333ee76c274da499acd160a680955 Mon Sep 17 00:00:00 2001 From: ServerDummy <63013446+ServerDummy@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:08:07 -0600 Subject: [PATCH 2/6] template test --- pull_request_template.md | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pull_request_template.md diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 00000000000000..3041ba61753ebe --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,42 @@ +## Pull Request Template + +**Please fill out this template to help us review your pull request:** + +**Title:** + +**Description:** + +* Briefly describe the changes made in this pull request. +* Explain the motivation for the changes. +* Describe any potential drawbacks or limitations of the changes. + +**Steps to reproduce:** + +* Describe the steps needed to reproduce the issue or behavior addressed by this pull request. + +**Expected behavior:** + +* Describe the expected behavior after applying the changes in this pull request. + +**Actual behavior:** + +* Describe the actual behavior before applying the changes in this pull request. + +**Testing:** + +* Describe how you tested the changes in this pull request. +* Include any relevant test results. + +**Additional notes:** + +* Include any additional information that you think is important for reviewers to know. + +## Checklist:** + +* [ ] I have added a descriptive title to my pull request. +* [ ] I have filled out all sections of this template. +* [ ] I have reviewed the Openpilot coding guidelines. +* [ ] I have included tests for my changes. +* [ ] I have documented my changes in the README file. + +**Thank you for your contribution!** \ No newline at end of file From 6773cbcad126c404942e1444045da353e86a3c01 Mon Sep 17 00:00:00 2001 From: ServerDummy <63013446+ServerDummy@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:24:17 -0600 Subject: [PATCH 3/6] Update PR-Review.yml fix --- .github/workflows/PR-Review.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/PR-Review.yml b/.github/workflows/PR-Review.yml index 3cc87c6dc94e1b..b40d2bc7f84714 100644 --- a/.github/workflows/PR-Review.yml +++ b/.github/workflows/PR-Review.yml @@ -9,7 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Check for template run: | # Replace "" with the actual template string @@ -19,7 +18,6 @@ jobs: echo "Error: PR template is missing!" exit 1 fi - - name: Set draft status if: always() uses: actions/github-script@v6 @@ -31,7 +29,6 @@ jobs: issue_number: context.issue.number, state: 'draft' }) - - name: Add bot-review label if: always() uses: actions/github-script@v6 @@ -43,9 +40,8 @@ jobs: issue_number: context.issue.number, labels: ['bot-review'] }) - - name: Remove bot-review label - if: always() + if: github.event.pull_request.body.includes('# Pull Request Template') uses: actions/github-script@v6 with: script: | @@ -54,4 +50,4 @@ jobs: repo: context.repo.repo, issue_number: context.issue.number, name: 'bot-review' - }) \ No newline at end of file + }) From a48cc6e6d3aca5bf8ce70cc330d6e0996a225adc Mon Sep 17 00:00:00 2001 From: ServerDummy <63013446+ServerDummy@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:38:57 -0600 Subject: [PATCH 4/6] Update PR-Review.yml --- .github/workflows/PR-Review.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/PR-Review.yml b/.github/workflows/PR-Review.yml index b40d2bc7f84714..5e71c8bba12fcd 100644 --- a/.github/workflows/PR-Review.yml +++ b/.github/workflows/PR-Review.yml @@ -9,6 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Check for template run: | # Replace "" with the actual template string @@ -18,6 +19,7 @@ jobs: echo "Error: PR template is missing!" exit 1 fi + - name: Set draft status if: always() uses: actions/github-script@v6 @@ -29,6 +31,7 @@ jobs: issue_number: context.issue.number, state: 'draft' }) + - name: Add bot-review label if: always() uses: actions/github-script@v6 @@ -40,8 +43,9 @@ jobs: issue_number: context.issue.number, labels: ['bot-review'] }) + - name: Remove bot-review label - if: github.event.pull_request.body.includes('# Pull Request Template') + if: always() uses: actions/github-script@v6 with: script: | From e7cc07cd4c49f4819ec13e2aec39f7c536c5a23a Mon Sep 17 00:00:00 2001 From: ServerDummy <63013446+ServerDummy@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:51:39 -0600 Subject: [PATCH 5/6] Update PR-Review.yml --- .github/workflows/PR-Review.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/PR-Review.yml b/.github/workflows/PR-Review.yml index 5e71c8bba12fcd..65d16c822f49b0 100644 --- a/.github/workflows/PR-Review.yml +++ b/.github/workflows/PR-Review.yml @@ -2,7 +2,7 @@ name: PR Review on: pull_request: - branches: [ master ] + branches: [master] jobs: review: @@ -12,8 +12,8 @@ jobs: - name: Check for template run: | - # Replace "" with the actual template string - if grep -q "## Pull Request Template" ${{ github.event.pull_request.body }}; then + # Replace "## Pull Request Template" with the actual template string + if echo "${{ github.event.pull_request.body }}" | grep "## Pull Request Template" > /dev/null; then echo "Template found!" else echo "Error: PR template is missing!" From 4e3d99aa141efb0f10e77c6f194906ccd868e88a Mon Sep 17 00:00:00 2001 From: ServerDummy <63013446+ServerDummy@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:52:22 -0600 Subject: [PATCH 6/6] Create testing --- testing | 1 + 1 file changed, 1 insertion(+) create mode 100644 testing diff --git a/testing b/testing new file mode 100644 index 00000000000000..83d15049368572 --- /dev/null +++ b/testing @@ -0,0 +1 @@ +the quick brown fox jumps over the lazy brown dog