Skip to content

Daily Lead Time Summary #61

Daily Lead Time Summary

Daily Lead Time Summary #61

Workflow file for this run

name: Daily Lead Time Summary
on:
# 手動実行を許可
workflow_dispatch:
# 毎日午前0時(UTC)に実行 = 日本時間午前9時
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
jobs:
daily-leadtime-summary:
name: Daily Lead Time Summary
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: read
steps:
- name: Get yesterday's date range
shell: bash
run: |
# 前日の日付範囲を取得
start_time=$(date -u -d 'yesterday 00:00:00' +"%Y-%m-%d")
end_time=$(date -u -d 'today 00:00:00' +"%Y-%m-%d")
echo "date_range=$start_time..$end_time"
echo "date_range=$start_time..$end_time" >> "$GITHUB_ENV"
echo "report_date=$start_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
REPORT_TITLE: 'Daily Lead Time Report - ${{ env.report_date }}'
- name: Create daily summary issue
uses: peter-evans/create-issue-from-file@v5
with:
title: '📊 Daily Lead Time Report - ${{ env.report_date }}'
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./issue_metrics.md
labels: |
metrics
daily-report
automated