From c59bb823180a08f024e609e9091d1f4bb07e1955 Mon Sep 17 00:00:00 2001 From: Stacklok Bot Date: Thu, 22 Feb 2024 17:43:15 +0000 Subject: [PATCH] Replace unpinned actions with pinned action --- .github/workflows/pr-check.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index dd4e567fe7..18d72e073c 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -1,33 +1,31 @@ name: Pull Request Validation - on: pull_request: - types: [ opened, edited, reopened ] - + types: [opened, edited, reopened] jobs: check-pr-content: runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'stacklokbot[bot]' }} steps: - name: Check PR for Change Type Selection - uses: actions/github-script@v7 + uses: actions/github-script@5c56fde4671bc2d3592fb0f2c5b5bab9ddae03b1 # v7 with: script: | const pr = context.payload.pull_request; - + if (!pr) { console.log('This action must be run on a pull request event.'); core.setFailed('No pull request data found.'); return; } - + const prNumber = pr.number; const body = pr.body; - + console.log(`Processing PR #${prNumber}`); - + const changeTypeRegex = /\- \[[xX]\] (Bug fix|Feature|Breaking change|Documentation)/; - + if (!changeTypeRegex.test(body)) { core.setFailed("You must select at least one Change Type."); }