From 597cc0831ca095515315ebc25d7123dce45b6162 Mon Sep 17 00:00:00 2001 From: Mitch Dawson <86007219+mitchdawson1982@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:08:33 +0100 Subject: [PATCH] Dependabot issue creation (#802) initial commit --- .github/workflows/dependabot-create-issue.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/dependabot-create-issue.yml diff --git a/.github/workflows/dependabot-create-issue.yml b/.github/workflows/dependabot-create-issue.yml new file mode 100644 index 00000000..e5cbe775 --- /dev/null +++ b/.github/workflows/dependabot-create-issue.yml @@ -0,0 +1,29 @@ +name: Create issue for dependabot pr +on: + pull_request: + branches: + - dependabot/** + types: [opened, reopened] + + +jobs: + create_issue: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + steps: + - uses: actions/checkout@v2 + if: github.event.pull_request.user.login == 'dependabot[bot]' + + - name: Open issue if Dependabot PR + if: github.event.pull_request.user.login == 'dependabot[bot]' + env: + pr_title: ${{github.event.pull_request.title}} + pr_number: ${{github.event.pull_request.number}} + pr_url: ${{github.event.pull_request.url}} + run: | + project="Data Catalogue" + label="dependabot,dependencies" + title=":arrow_up: Review dependabot PR: $pr_title" + body="Dependabot has opened PR #$pr_number url - $pr_url + gh issue create --project "$project" --title "$title" --body "$body" --label "$label"