From 4ff5dab9228396f9a22f90b308378a77a7334bee Mon Sep 17 00:00:00 2001 From: Vedansh Date: Sat, 31 Aug 2024 09:12:59 +0530 Subject: [PATCH] Change PR Bot and Issue Bot. --- .github/workflows/pr-bot.yml | 62 +++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr-bot.yml b/.github/workflows/pr-bot.yml index 482c501..7bfa289 100644 --- a/.github/workflows/pr-bot.yml +++ b/.github/workflows/pr-bot.yml @@ -9,18 +9,58 @@ on: - cron: '0 */1 * * *' jobs: - create_pr: + create_auto_pr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Create or Open A PR + - uses: actions/checkout@v4 + + - name: Create Pull Request id: open-pr - uses: repo-sync/pull-request@v2 + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.BOT_TOKEN }} + author: "Hamster [bot] " + signoff: true + branch: ${{ github.ref_name }} + title: 'Automated Pull Request by Actions Bot.' + body: | + ## Automated Pull Request by Actions. + + > [!IMPORTANT] + > Trigger / What Happened: ${{ github.event_name }} at ${{ github.event_path }} path. + > Details of run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + + - Author: @npm-run-test + - Admin: @offensive-vk + - Branch: `${{ github.ref }}` + - Commit: ${{ github.sha }} + - Workflow Path: `${{ github.workflow_ref }}` + labels: | + bot + automated + assignees: npm-run-test + reviewers: offensive-vk + draft: false + create_issue: + runs-on: ubuntu-latest + steps: + - name: Create Issue using Bot + uses: dacbd/create-issue-action@main with: - destination_branch: "classic" - pr_title: "Automated Pull Request by Actions Bot." - pr_template: ".github/PR_BOT_TEMPLATE.md" - pr_reviewer: "offensive-vk" - pr_label: "bot,automated,unknown" - pr_assignee: "npm-run-test" - pr_draft: false \ No newline at end of file + token: ${{ secrets.BOT_TOKEN }} + title: | + [${{ github.workflow }}] during [${{ github.event_name }}] + assignees: npm-run-test + labels: automated + body: | + ## Information Regarding the Pull Request: + + > [!IMPORTANT] + > Trigger / What Happened: ${{ github.event_name }} at ${{ github.event_path }} path. + > Details of Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + + - Author: @npm-run-test + - Admin: @offensive-vk + - Branch: `${{ github.ref }}` + - Commit: ${{ github.sha }} + - Workflow Path: `${{ github.workflow_ref }}` \ No newline at end of file