mirror of
https://github.com/bitnami/charts.git
synced 2026-02-26 15:57:38 +08:00
[bitnami/charts] Fix workflow issues with existing cards (#14429)
Signed-off-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
35
.github/workflows/delete-solved-cards.yml
vendored
35
.github/workflows/delete-solved-cards.yml
vendored
@@ -19,20 +19,21 @@ jobs:
|
||||
with:
|
||||
path: .github/workflows/
|
||||
- uses: actions/github-script@v6
|
||||
script: |
|
||||
const cards = await github.rest.projects.listCards({
|
||||
column_id: ${{ env.SOLVED_COLUMN_ID }},
|
||||
archived_state: all,
|
||||
per_page: 100
|
||||
});
|
||||
// Remove cards without updates in last week.
|
||||
const comparedDate = new Date();
|
||||
comparedDate.setDate(comparedDate.getDate() - 7);
|
||||
cards.forEach(card => {
|
||||
const lastUpdate = new Date(card.updated_at);
|
||||
if (card.archived || lastUpdate < comparedDate ) {
|
||||
github.rest.projects.deleteCard({
|
||||
card_id: card.id
|
||||
});
|
||||
}
|
||||
});
|
||||
with:
|
||||
script: |
|
||||
const cards = await github.rest.projects.listCards({
|
||||
column_id: ${{ env.SOLVED_COLUMN_ID }},
|
||||
archived_state: all,
|
||||
per_page: 100
|
||||
});
|
||||
// Remove cards without updates in last week.
|
||||
const comparedDate = new Date();
|
||||
comparedDate.setDate(comparedDate.getDate() - 7);
|
||||
cards.forEach(card => {
|
||||
const lastUpdate = new Date(card.updated_at);
|
||||
if (card.archived || lastUpdate < comparedDate ) {
|
||||
github.rest.projects.deleteCard({
|
||||
card_id: card.id
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user