From 2e9442f6c1f800b41724165ff971e40fe9406a47 Mon Sep 17 00:00:00 2001 From: MisRob Date: Mon, 8 Apr 2024 07:58:26 +0200 Subject: [PATCH] Update to the latest action --- .github/workflows/changelog.yml | 10 ++-------- .github/workflows/update_changelog.yml | 8 +------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 6cd50b1..ec4bb73 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -12,12 +12,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Check if PR is from dependabot - id: check-dependabot - run: | - is_dependabot=$(jq -r '.pull_request.user.login' $GITHUB_EVENT_PATH) - echo "is_dependabot=$is_dependabot" >> $GITHUB_OUTPUT - - name: Check PR Description id: check_description run: | @@ -32,10 +26,10 @@ jobs: - name: Results run: | - if [[ "${{ steps.check_description.outputs.containsChangelog }}" == "true" || "${{ steps.check-dependabot.outputs.is_dependabot }}" == "dependabot[bot]" ]]; then + if [[ "${{ steps.check_description.outputs.containsChangelog }}" == "true" || "${{ github.event.pull_request.user.login }}" == "dependabot[bot]" ]]; then echo "PR contains Changelog section/ PR made by Dependabot" exit 0 else echo "Changelog section is missing or does not contain the required details" exit 1 - fi \ No newline at end of file + fi diff --git a/.github/workflows/update_changelog.yml b/.github/workflows/update_changelog.yml index a6a1300..6040256 100644 --- a/.github/workflows/update_changelog.yml +++ b/.github/workflows/update_changelog.yml @@ -18,16 +18,10 @@ jobs: with: ref: ${{ github.event.pull_request.base.ref }} - - name: Check if PR is from dependabot - id: check-dependabot - run: | - is_dependabot=$(jq -r '.pull_request.user.login' $GITHUB_EVENT_PATH) - echo "is_dependabot=$is_dependabot" >> $GITHUB_OUTPUT - - name: Extract and update Changelog id: modify-changelog run: | - if [ "${{ steps.check-dependabot.outputs.is_dependabot }}" == "dependabot[bot]" ]; then + if [ "${{ github.event.pull_request.user.login }}" == "dependabot[bot]" ]; then changelog="- **Description:** ${{ github.event.pull_request.title }}\n - **Products impact:** Dev Dependency upgrade\n - **Addresses:** -\n - **Components:** -\n - **Breaking:** -\n - **Impacts a11y:** -\n - **Guidance:** -" else description=$(jq -r ".pull_request.body" "$GITHUB_EVENT_PATH")