From 07da0991e684a576dd10c228676c3c5d956a120c Mon Sep 17 00:00:00 2001 From: Junya Okabe Date: Fri, 1 Sep 2023 02:13:02 +0900 Subject: [PATCH 1/4] fix: OR query --- .github/workflows/metrics-multi-repo.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/metrics-multi-repo.yml b/.github/workflows/metrics-multi-repo.yml index f982d5db..a3892d60 100644 --- a/.github/workflows/metrics-multi-repo.yml +++ b/.github/workflows/metrics-multi-repo.yml @@ -25,17 +25,11 @@ jobs: echo "$first_day..$last_day" echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" - - name: Get issue metrics (repo1) + - name: Get issue metrics repo uses: github/issue-metrics@v2 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SEARCH_QUERY: 'repo:Okabe-Junya/sandbox is:issue created:${{ env.last_month }} -reason:"not planned"' - - - name: Get issue metrics (repo2) - uses: github/issue-metrics@v2 - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SEARCH_QUERY: 'repo:Okabe-Junya/dotfiles is:issue created:${{ env.last_month }} -reason:"not planned"' + SEARCH_QUERY: 'repo:Okabe-Junya/sandbox OR repo:Okabe-Junya/dotfiles is:issue created:${{ env.last_month }} -reason:"not planned"' - name: Create issue uses: peter-evans/create-issue-from-file@v4 @@ -43,4 +37,4 @@ jobs: title: Monthly issue metrics report token: ${{ secrets.GITHUB_TOKEN }} content-filepath: ./issue_metrics.md - assignees: + assignees: Okabe-Junya From dfdaf174679f5dc875e638d7c3eed1f821558c43 Mon Sep 17 00:00:00 2001 From: Junya Okabe <86868255+Okabe-Junya@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:40:20 +0900 Subject: [PATCH 2/4] del: OR --- .github/workflows/metrics-multi-repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/metrics-multi-repo.yml b/.github/workflows/metrics-multi-repo.yml index a3892d60..ef41fc9d 100644 --- a/.github/workflows/metrics-multi-repo.yml +++ b/.github/workflows/metrics-multi-repo.yml @@ -29,7 +29,7 @@ jobs: uses: github/issue-metrics@v2 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SEARCH_QUERY: 'repo:Okabe-Junya/sandbox OR repo:Okabe-Junya/dotfiles is:issue created:${{ env.last_month }} -reason:"not planned"' + SEARCH_QUERY: 'repo:Okabe-Junya/sandbox repo:Okabe-Junya/dotfiles is:issue created:${{ env.last_month }} -reason:"not planned"' - name: Create issue uses: peter-evans/create-issue-from-file@v4 From 7b2a482f828ffdf2dcf2fb8ac7b958ff1d14b9b2 Mon Sep 17 00:00:00 2001 From: Junya Okabe <86868255+Okabe-Junya@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:44:01 +0900 Subject: [PATCH 3/4] =?UTF-8?q?update:=20=E3=82=AB=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E3=83=8F=E3=83=BC=E3=83=89=E3=82=B3=E3=83=BC=E3=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/metrics-multi-repo.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/metrics-multi-repo.yml b/.github/workflows/metrics-multi-repo.yml index ef41fc9d..dfb15334 100644 --- a/.github/workflows/metrics-multi-repo.yml +++ b/.github/workflows/metrics-multi-repo.yml @@ -15,15 +15,8 @@ jobs: - name: Get dates for last month shell: bash run: | - # Calculate the first day of the previous month - first_day=$(date -d "last month" +%Y-%m-01) - - # Calculate the last day of the previous month - last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) - - #Set an environment variable with the date range - echo "$first_day..$last_day" - echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" + # 検証のためハードコードする + echo "last_month=2022-07-01..2023-07-31" >> "$GITHUB_ENV" - name: Get issue metrics repo uses: github/issue-metrics@v2 From c26b510f4450e508abae6e56f0b10878835fa9c6 Mon Sep 17 00:00:00 2001 From: Junya Okabe Date: Fri, 1 Sep 2023 03:19:37 +0900 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=E3=83=8F=E3=83=BC=E3=83=89=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=82=92=E6=88=BB=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/metrics-multi-repo.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/metrics-multi-repo.yml b/.github/workflows/metrics-multi-repo.yml index dfb15334..08c19690 100644 --- a/.github/workflows/metrics-multi-repo.yml +++ b/.github/workflows/metrics-multi-repo.yml @@ -15,8 +15,13 @@ jobs: - name: Get dates for last month shell: bash run: | - # 検証のためハードコードする - echo "last_month=2022-07-01..2023-07-31" >> "$GITHUB_ENV" + # Calculate the first day of the previous month + first_day=$(date -d "last month" +%Y-%m-01) + # Calculate the last day of the previous month + last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) + #Set an environment variable with the date range + echo "$first_day..$last_day" + echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" - name: Get issue metrics repo uses: github/issue-metrics@v2