Skip to content

Per-pulse issue metrics (Multi Repo) #3

Per-pulse issue metrics (Multi Repo)

Per-pulse issue metrics (Multi Repo) #3

Workflow file for this run

name: Per-pulse issue metrics (Multi Repo)
on:
workflow_dispatch:
permissions:
issues: write
pull-requests: read
jobs:
build:
name: issue metrics
runs-on: ubuntu-latest
steps:
- name: Calculate query
shell: bash
run: |
pulse_start=$(date -d "1 fortnight ago" +%Y-%m-%d)
today=$(date +%Y-%m-%d)
repos='repo:canonical/charmed-openstack-upgrader repo:canonical/hardware-observer-operator repo:canonical/snap-tempest'
range="$pulse_start..$today"
query="type:pr $repos created:$range"
echo "$query"
echo "query=$query" >> "$GITHUB_ENV"
echo "range=$range" >> "$GITHUB_ENV"
- name: Get issue metrics
uses: github/issue-metrics@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: '${{ env.query }}'
HIDE_TIME_TO_ANSWER: 'true'
- name: Create issue
uses: peter-evans/create-issue-from-file@v5
with:
title: 'Issue metrics report (${{ env.range }})'
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./issue_metrics.md
assignees: aieri