Skip to content

Instantly share code, notes, and snippets.

@kuroppe1819
Last active September 30, 2023 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuroppe1819/c7a48acac4bd4656b0963b0a753842e6 to your computer and use it in GitHub Desktop.
Save kuroppe1819/c7a48acac4bd4656b0963b0a753842e6 to your computer and use it in GitHub Desktop.
Weekly issue metrics
name: Weekly issue metrics
on:
schedule:
- cron: "0 18 * * 3" # 毎週木曜日の03:00(JST)
jobs:
create-issue-metrics:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v3
- name: ENV settings
run: echo "ONE_WEEK_AGO=$(date -d '7 days ago' +%Y-%m-%d)" >> $GITHUB_ENV
- name: Run issue-metrics tool
uses: github/issue-metrics@v2.7.0
env:
SEARCH_QUERY: "repo:hoge is:issue is:closed updated:>=${{ env.ONE_WEEK_AGO }} -label:metrics"
- name: Create issue
run: gh issue create
--title "Weekly issue metrics (${{ env.ONE_WEEK_AGO }} ~ $(date +%Y-%m-%d))"
--body-file ./issue_metrics.md
--label "metrics"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment