From 2ded2b767951343798535e45103f560338ce0fb0 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 12 Dec 2022 07:35:38 +0800 Subject: [PATCH 1/2] Yo dawg i heard you like dependabot so i put dependabot on your dependabot. --- .github/dependabot.yml | 9 +++++++++ changes/README.md | 1 + 2 files changed, 10 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 changes/README.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..cc107d77 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates on Sunday, 8PM UTC + interval: "weekly" + day: "sunday" + time: "20:00" diff --git a/changes/README.md b/changes/README.md new file mode 100644 index 00000000..3463a5c2 --- /dev/null +++ b/changes/README.md @@ -0,0 +1 @@ +Automatic changenotes will be added here. From 5a814f5c9b5737e28a77dda06036dd03ce4d29dd Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 12 Dec 2022 11:40:30 +0800 Subject: [PATCH 2/2] Disable the dependabot changenote workflow on the .github repository. --- .github/workflows/dependabot-changenote.yml | 6 +++--- changes/README.md | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 changes/README.md diff --git a/.github/workflows/dependabot-changenote.yml b/.github/workflows/dependabot-changenote.yml index 1b338d56..3e39a8b0 100644 --- a/.github/workflows/dependabot-changenote.yml +++ b/.github/workflows/dependabot-changenote.yml @@ -9,7 +9,7 @@ permissions: jobs: changenote: name: Dependabot Change Note - if: github.actor == 'dependabot[bot]' + if: github.actor == 'dependabot[bot]' && github.repository != 'beeware/.github' runs-on: ubuntu-latest timeout-minutes: 5 steps: @@ -30,11 +30,11 @@ jobs: # Fetch PR number for commit from Github API API_URL="${{ github.api_url }}/repos/${{ github.repository }}/commits/${{ github.event.head_commit.id }}/pulls" PR_NUM=$(curl -s -H "Accept: application/vnd.github+json" "${API_URL}" | jq -r '.[].number') - + # Create change note from first line of dependabot commit NEWS=$(printf "%s" "${{ github.event.head_commit.message }}" | head -n1 | sed -e 's/Bump/Updated/') printf "%s.\n" "${NEWS}" > "./changes/${PR_NUM}.misc.rst" - + # Commit the change note git add "./changes/${PR_NUM}.misc.rst" # "dependabot skip" tells Dependabot to continue rebasing this branch despite foreign commits diff --git a/changes/README.md b/changes/README.md deleted file mode 100644 index 3463a5c2..00000000 --- a/changes/README.md +++ /dev/null @@ -1 +0,0 @@ -Automatic changenotes will be added here.