From 43cce709e37858d0a9d7d75f97d4cefe097b863a Mon Sep 17 00:00:00 2001 From: Raksha Bharuka Date: Thu, 21 Nov 2024 17:28:00 +0530 Subject: [PATCH] Create JIRA Issue from Dependabot PR --- .github/workflows/dependabot.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 91ef882d..3dd9c6ec 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -6,7 +6,7 @@ on: jobs: create_jira_issue: -# if: github.actor == 'dependabot[bot]' + if: github.actor == 'dependabot[bot]' runs-on: ubuntu-latest steps: @@ -31,16 +31,3 @@ jobs: - **Branch**: ${{ github.event.pull_request.head.ref }} - **PR Link**: ${{ github.event.pull_request.html_url }} - **Author**: ${{ github.actor }} - - - name: Add Comment to PR with JIRA Issue - uses: actions/github-script@v6 - with: - script: | - const issueKey = context.payload.pull_request.title.match(/([A-Z]+-\d+)/); - const jiraIssueUrl = `https://${process.env.JIRA_BASE_URL}/browse/${issueKey}`; - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `JIRA Issue created: [${issueKey}](${jiraIssueUrl})`, - }); \ No newline at end of file