Skip to content

Commit 075e2b6

Browse files
chore: central update of update-issue-on-close.yml
1 parent f01287f commit 075e2b6

1 file changed

Lines changed: 13 additions & 36 deletions

File tree

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,18 @@
1-
name: Set Project Closed Date
1+
# Generated automatically by org-governance-bot. Do not edit manually.
2+
name: "Set Project Closed Date"
23

34
on:
45
issues:
5-
types: [closed]
6-
7-
permissions:
8-
contents: read
9-
issues: read
10-
11-
env:
12-
PROJECT_URL: https://github.com/orgs/blinklabs-io/projects/11
13-
CLOSED_DATE_FIELD: "Closed Date"
6+
types:
7+
- closed
8+
workflow_dispatch:
149

1510
jobs:
16-
set-date:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Resolve closed date
20-
id: when
21-
shell: bash
22-
env:
23-
ISSUE_CLOSED_AT: ${{ github.event.issue.closed_at }}
24-
run: |
25-
ts="$ISSUE_CLOSED_AT"
26-
if [ -z "$ts" ] || [ "$ts" = "null" ]; then
27-
d=$(date -u +%F)
28-
else
29-
d=$(date -u -d "$ts" +%F)
30-
fi
31-
echo "date=$d" >> "$GITHUB_OUTPUT"
32-
echo "Closed date -> $d"
33-
34-
# Update the "Closed Date" field on that project item
35-
- name: Update Closed Date field
36-
uses: nipe0324/update-project-v2-item-field@c4af58452d1c5a788c1ea4f20e073fa722ec4a6b
37-
with:
38-
project-url: ${{ env.PROJECT_URL }}
39-
github-token: ${{ secrets.ORG_PROJECT_PAT }}
40-
field-name: ${{ env.CLOSED_DATE_FIELD }}
41-
field-value: ${{ steps.when.outputs.date }}
11+
orchestrate:
12+
uses: blinklabs-io/actions/.github/workflows/reuseable-set-project-closed-date.yml@main
13+
secrets:
14+
project_pat: ${{ secrets.ORG_PROJECT_PAT }}
15+
with:
16+
closed_at: ${{ github.event.issue.closed_at }}
17+
closed_date_field: Closed Date
18+
project_url: https://github.com/orgs/blinklabs-io/projects/11

0 commit comments

Comments
 (0)