Skip to content

Commit 8239132

Browse files
authored
Update GH action to publish monthly issue metrics (#6653)
Update issue-metrics.yml
1 parent f073ae1 commit 8239132

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/issue-metrics.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88
name: Monthly issue metrics
99
on: # yamllint disable-line rule:truthy
1010
workflow_dispatch:
11-
schedule:
12-
- cron: '3 2 1 * *'
13-
11+
inputs:
12+
report_date_start:
13+
description: "Report date start(01/01/2024)"
14+
required: false
15+
report_date_end:
16+
description: "Report date end(11/07/2024)"
17+
required: false
1418
permissions:
1519
issues: write
1620
pull-requests: read
@@ -24,13 +28,10 @@ jobs:
2428
shell: bash
2529
run: |
2630
# Calculate the first day of the previous month
27-
first_day=$(date -d "last month" +%Y-%m-01)
31+
first_day=${{ inputs.report_date_start }}
2832
2933
# Calculate the last day of the previous month
30-
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
31-
32-
# Set an environment variable with the date range
33-
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
34+
last_day=${{ inputs.report_date_end }}
3435
3536
- name: Run issue-metrics tool
3637
uses: github/issue-metrics@v2

0 commit comments

Comments
 (0)