diff --git a/.github/actions/supersnyk/action.yml b/.github/actions/supersnyk/action.yml deleted file mode 100644 index 6b9ce9b..0000000 --- a/.github/actions/supersnyk/action.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Create SuperSnyk 🦸 Pull Request -description: "When triggered, combines any PR with the 'snyk' label into a single SuperSnyk 🦸 PR. If a SuperSnyk 🦸 PR already exists, it will be updated." -inputs: - repo-token: - description: "The GitHub token" - required: true - default: "CHANGE_ME" -runs: - using: "composite" - steps: - - uses: actions/checkout@v2 - with: - ref: main - fetch-depth: 0 - - uses: bobvanderlinden/combine-pull-requests@v3 - with: - label: snyk - repo-token: ${{ inputs.repo-token }} - - name: Get Snyk PRs metadata - run: get-snyk-prs-metadata.sh - shell: bash - env: - GITHUB_TOKEN: ${{ inputs.repo-token }} - - name: Create SuperSnyk 🦸 PR - uses: peter-evans/create-pull-request@v4 - with: - title: 🦸 SuperSnyk - body: "🦸 SuperSnyk PR created with [create-pull-request](https://github.com/peter-evans/create-pull-request)\n${{ env.SUPERSNYK_PR_BODY }}" diff --git a/.github/actions/supersnyk/get-snyk-prs-metadata.sh b/.github/actions/supersnyk/get-snyk-prs-metadata.sh deleted file mode 100755 index 72f4979..0000000 --- a/.github/actions/supersnyk/get-snyk-prs-metadata.sh +++ /dev/null @@ -1,2 +0,0 @@ -SUPERSNYK_PR_BODY=$(gh pr list --label snyk --json number | jq '.[]|.number' | while read line; do echo "closes #$line"; done) -echo "SUPERSNYK_PR_BODY="$SUPERSNYK_PR_BODY"" >> $GITHUB_ENV \ No newline at end of file diff --git a/action.yml b/action.yml index 6b9ce9b..382a4ce 100644 --- a/action.yml +++ b/action.yml @@ -16,8 +16,10 @@ runs: with: label: snyk repo-token: ${{ inputs.repo-token }} + - run: chmod +x $GITHUB_ACTION_PATH/get-snyk-prs-metadata.sh + shell: bash - name: Get Snyk PRs metadata - run: get-snyk-prs-metadata.sh + run: $GITHUB_ACTION_PATH/get-snyk-prs-metadata.sh shell: bash env: GITHUB_TOKEN: ${{ inputs.repo-token }}