Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/issue-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
name: Monthly issue metrics
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'

inputs:
report_date_start:
description: "Report date start(01/01/2024)"
required: false
report_date_end:
description: "Report date end(11/07/2024)"
required: false
permissions:
issues: write
pull-requests: read
Expand All @@ -24,13 +28,10 @@ jobs:
shell: bash
run: |
# Calculate the first day of the previous month
first_day=$(date -d "last month" +%Y-%m-01)
first_day=${{ inputs.report_date_start }}

# Calculate the last day of the previous month
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)

# Set an environment variable with the date range
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
last_day=${{ inputs.report_date_end }}

- name: Run issue-metrics tool
uses: github/issue-metrics@v2
Expand Down