-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.96 KB
/
weekly-report.yml
File metadata and controls
59 lines (52 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Weekly Lead Time Report
on:
# 手動実行を許可
workflow_dispatch:
# 毎週月曜日の午前0時(UTC)に実行
schedule:
- cron: '0 0 * * 1'
permissions:
contents: read
jobs:
weekly-leadtime-report:
name: Weekly Lead Time Report
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: read
steps:
- name: Get last week's date range
shell: bash
run: |
# 先週の月曜日から日曜日までの範囲を取得
start_time=$(date -u -d 'last monday -7 days' +"%Y-%m-%d")
end_time=$(date -u -d 'last monday' +"%Y-%m-%d")
echo "date_range=$start_time..$end_time"
echo "date_range=$start_time..$end_time" >> "$GITHUB_ENV"
echo "start_date=$start_time" >> "$GITHUB_ENV"
echo "end_date=$end_time" >> "$GITHUB_ENV"
- name: Run issue-metrics tool
uses: github/issue-metrics@v3
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 自分のリポジトリに変更してください
SEARCH_QUERY: 'repo:github/issue-metrics is:pr merged:${{ env.date_range }}'
HIDE_AUTHOR: false
HIDE_TIME_TO_FIRST_RESPONSE: false
HIDE_TIME_TO_CLOSE: false
HIDE_TIME_TO_ANSWER: true
HIDE_LABEL_METRICS: true
HIDE_ITEMS_CLOSED_COUNT: false
HIDE_PR_STATISTICS: false # PR統計情報を表示
DRAFT_PR_TRACKING: true # ドラフトPRも追跡
REPORT_TITLE: 'Weekly Lead Time Report - ${{ env.start_date }} to ${{ env.end_date }}'
- name: Create weekly summary issue
uses: peter-evans/create-issue-from-file@v5
with:
title: '📈 Weekly Lead Time Report - ${{ env.start_date }} to ${{ env.end_date }}'
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./issue_metrics.md
labels: |
metrics
weekly-report
automated