From 2758395c0e07f73ca5cb554921bac34fcfbd3014 Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Thu, 3 Nov 2022 15:29:29 +0200 Subject: [PATCH 1/8] Add a do not merge to dependabot hub image bumps --- .github/dependabot.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index ef47980957..a996706f1a 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -70,3 +70,5 @@ updates: dependency-name: "*" # Match all packages reviewers: - "2i2c-org/tech-team" + labels: + - "do not merge" From fe5ab86b94b4647a9300f1dcad353778bca73082 Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Thu, 3 Nov 2022 15:36:45 +0200 Subject: [PATCH 2/8] Also add an additional commit msg prefix --- .github/dependabot.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index a996706f1a..d6a72dd512 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -72,3 +72,5 @@ updates: - "2i2c-org/tech-team" labels: - "do not merge" + commit-message: + - prefix: "[Do Not Merge]" From 643ff54d1fcac88b95035a712989f6433a252b30 Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Thu, 3 Nov 2022 15:40:00 +0200 Subject: [PATCH 3/8] Add a comment about the do not merge --- .github/dependabot.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index d6a72dd512..934565be81 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -58,7 +58,7 @@ updates: dependency-name: "*" # Match all packages reviewers: - "2i2c-org/tech-team" - # Maintain dependencies for pip defined in helm-charts/images/hub folder (default hub image) + # Signal pip dependencies updates in helm-charts/images/hub folder (default hub image) - package-ecosystem: "pip" directory: "/helm-charts/images/hub" schedule: @@ -70,6 +70,8 @@ updates: dependency-name: "*" # Match all packages reviewers: - "2i2c-org/tech-team" + # This dependabot PRs should not be merged as is, because additional manual steps are required also. + # Checkout https://infrastructure.2i2c.org/en/latest/topic/infrastructure/hub-image.html#updating-the-hub-image labels: - "do not merge" commit-message: From 0899bbc0fc2211e1f2198f999c1556f59ac06309 Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Thu, 3 Nov 2022 16:09:41 +0200 Subject: [PATCH 4/8] Update label --- .github/dependabot.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 934565be81..8d67ebbc5b 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -73,6 +73,4 @@ updates: # This dependabot PRs should not be merged as is, because additional manual steps are required also. # Checkout https://infrastructure.2i2c.org/en/latest/topic/infrastructure/hub-image.html#updating-the-hub-image labels: - - "do not merge" - commit-message: - - prefix: "[Do Not Merge]" + - "requires follow-up"" From e349559ceea090cb9f8350dac61fac6de6b0baff Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Thu, 3 Nov 2022 16:27:10 +0200 Subject: [PATCH 5/8] Add workflow to comment on dependabot prs --- .github/workflows/comment-dependabot-prs.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/comment-dependabot-prs.yaml diff --git a/.github/workflows/comment-dependabot-prs.yaml b/.github/workflows/comment-dependabot-prs.yaml new file mode 100644 index 0000000000..67dcda1a8f --- /dev/null +++ b/.github/workflows/comment-dependabot-prs.yaml @@ -0,0 +1,18 @@ +name: Comment dependabot PRs with specific label +on: + pull_request: + types: + - labeled +jobs: + add-comment: + if: github.event.label.name == 'requires follow-up' + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Add comment + uses: peter-evans/create-or-update-comment@v2 + with: + issue-number: ${{ github.event.issue.number }} + body: | + After merging this PR, remember to take the additional manual steps described in https://infrastructure.2i2c.org/en/latest/topic/infrastructure/hub-image.html#updating-the-hub-image \ No newline at end of file From 4bfa28a73425d18584ced2c59fdea7d23c194b33 Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Thu, 3 Nov 2022 16:28:09 +0200 Subject: [PATCH 6/8] Add comment about documentation from GitHub --- .github/workflows/comment-dependabot-prs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/comment-dependabot-prs.yaml b/.github/workflows/comment-dependabot-prs.yaml index 67dcda1a8f..520eb58f4e 100644 --- a/.github/workflows/comment-dependabot-prs.yaml +++ b/.github/workflows/comment-dependabot-prs.yaml @@ -1,3 +1,4 @@ +# From https://docs.github.com/en/actions/managing-issues-and-pull-requests/commenting-on-an-issue-when-a-label-is-added name: Comment dependabot PRs with specific label on: pull_request: From a211c735ca0424c11556d8459f84aa13fbc69eda Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Thu, 3 Nov 2022 16:34:26 +0200 Subject: [PATCH 7/8] Indent the comments differently --- .github/dependabot.yaml | 4 ++-- .github/workflows/comment-dependabot-prs.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 8d67ebbc5b..9a1902992d 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -70,7 +70,7 @@ updates: dependency-name: "*" # Match all packages reviewers: - "2i2c-org/tech-team" - # This dependabot PRs should not be merged as is, because additional manual steps are required also. - # Checkout https://infrastructure.2i2c.org/en/latest/topic/infrastructure/hub-image.html#updating-the-hub-image labels: + # This dependabot PRs should not be merged as is, because additional manual steps are required also. + # Checkout https://infrastructure.2i2c.org/en/latest/topic/infrastructure/hub-image.html#updating-the-hub-image - "requires follow-up"" diff --git a/.github/workflows/comment-dependabot-prs.yaml b/.github/workflows/comment-dependabot-prs.yaml index 520eb58f4e..af4838b254 100644 --- a/.github/workflows/comment-dependabot-prs.yaml +++ b/.github/workflows/comment-dependabot-prs.yaml @@ -16,4 +16,4 @@ jobs: with: issue-number: ${{ github.event.issue.number }} body: | - After merging this PR, remember to take the additional manual steps described in https://infrastructure.2i2c.org/en/latest/topic/infrastructure/hub-image.html#updating-the-hub-image \ No newline at end of file + After merging this PR, remember to take the additional manual steps described in https://infrastructure.2i2c.org/en/latest/topic/infrastructure/hub-image.html#updating-the-hub-image From 5be369f105b7a6bea867d7a4c15366fae979559e Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Thu, 3 Nov 2022 16:48:20 +0200 Subject: [PATCH 8/8] Remove extra doble quotes --- .github/dependabot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 9a1902992d..8ef3b945f9 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -73,4 +73,4 @@ updates: labels: # This dependabot PRs should not be merged as is, because additional manual steps are required also. # Checkout https://infrastructure.2i2c.org/en/latest/topic/infrastructure/hub-image.html#updating-the-hub-image - - "requires follow-up"" + - "requires follow-up"