File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Monthly issue metrics
2
+ on :
3
+ workflow_dispatch :
4
+ schedule :
5
+ - cron : ' 3 2 1 * *'
6
+
7
+ permissions :
8
+ contents : read
9
+
10
+ jobs :
11
+ build :
12
+ name : issue metrics
13
+ runs-on : ubuntu-latest
14
+ permissions :
15
+ issues : write
16
+ pull-requests : read
17
+ steps :
18
+ - name : Get dates for last month
19
+ shell : bash
20
+ run : |
21
+ # Calculate the first day of the previous month
22
+ first_day=$(date -d "last month" +%Y-%m-01)
23
+
24
+ # Calculate the last day of the previous month
25
+ last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
26
+
27
+ #Set an environment variable with the date range
28
+ echo "$first_day..$last_day"
29
+ echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
30
+
31
+ - name : Run issue-metrics tool
32
+ uses : github/issue-metrics@v3
33
+ env :
34
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35
+ SEARCH_QUERY : ' repo:zarr-developers/zarr-python is:issue created:${{ env.last_month }} -reason:"not planned"'
36
+
37
+ - name : Create issue
38
+ uses : peter-evans/create-issue-from-file@v5
39
+ with :
40
+ title : Monthly issue metrics report
41
+ token : ${{ secrets.GITHUB_TOKEN }}
42
+ content-filepath : ./issue_metrics.md
You can’t perform that action at this time.
0 commit comments