[bitnami/containers] Reduce GitHub API requests (#27835)

* [bitnami/containers] Reduce GitHub API requests

Signed-off-by: Fran Mulero <fmulero@vmware.com>

* Use pr number as part of the temporary file

Signed-off-by: Fran Mulero <fmulero@vmware.com>

* Remove automated PRs from the 'Move closed issues' workflow

Signed-off-by: Fran Mulero <fmulero@vmware.com>

---------

Signed-off-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
Fran Mulero
2023-03-23 10:45:53 +01:00
committed by GitHub
parent f15d114158
commit 1e05f989fa
4 changed files with 38 additions and 21 deletions
+4 -10
View File
@@ -18,18 +18,12 @@ jobs:
- name: Send to the Solved column
id: send-solved
uses: peter-evans/create-or-update-project-card@v2
# Send to solve only the issues and PRs created by users or the automated PRs with human review required
if: |
(github.event.issue != null && github.event.issue.user.login != 'bitnami-bot') ||
(github.event.issue == null && (github.event.pull_request.user.login != 'bitnami-bot' || contains(github.event.pull_request.labels.*.name, 'review-required')))
with:
project-name: Support
column-name: 'Solved'
token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
issue-number: ${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
- name: Remove cards from automated PRs
if: |
(github.event.issue != null && github.event.issue.user.login == 'bitnami-bot') ||
(github.event.issue == null && github.event.pull_request.user.login == 'bitnami-bot')
uses: actions/github-script@v6
with:
script: |
github.rest.projects.deleteCard({
card_id: ${{ steps.send-solved.outputs.card-id }}
});