Skip to content

Commit 9179f68

Browse files
authored
Merge pull request #75 from snickerjp/feat-update_workflow
Feat update workflow
2 parents 5547e7b + e9b56eb commit 9179f68

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/issue-metrics.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
GH_APP_ID: ${{ secrets.GH_APP_ID }}
3838
GH_APP_INSTALLATION_ID: ${{ secrets.GH_APP_INSTALLATION_ID }}
3939
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
40-
SEARCH_QUERY: 'repo:snickerjp/docker-mysql-shell is:issue created:${{ env.last_month }} -reason:"not planned"'
40+
SEARCH_QUERY: 'repo:snickerjp/docker-mysql-shell is:issue created:${{ env.last_month }} -reason:"not planned" -label:metrics -title:"Monthly issue metrics report" -title:"Monthly PR metrics report"'
4141

4242
# - name: Get user names from team
4343
# run: |
@@ -48,12 +48,20 @@ jobs:
4848

4949
- name: Create issue
5050
uses: peter-evans/create-issue-from-file@v5
51+
id: create_issue_report # Ensure id is present
5152
with:
5253
title: Monthly issue metrics report
5354
token: ${{ secrets.GITHUB_TOKEN }}
5455
content-filepath: ./issue_metrics.md
56+
labels: metrics # This line remains to keep labeling functionality
5557
#assignees: ${{ env.TEAM_MEMBERS }}
5658

59+
- name: Close issue report immediately
60+
uses: peter-evans/close-issue@v3
61+
with:
62+
issue-number: ${{ steps.create_issue_report.outputs.issue-number }}
63+
comment: 'Metrics report issue automatically closed after creation. Labels are retained.'
64+
5765
- name: Report on PRs
5866
uses: github/issue-metrics@v3
5967
env:
@@ -62,7 +70,15 @@ jobs:
6270

6371
- name: Create report for PRs
6472
uses: peter-evans/create-issue-from-file@v5
73+
id: create_pr_report # Ensure id is present
6574
with:
6675
title: Monthly PR metrics report
6776
token: ${{ secrets.GITHUB_TOKEN }}
6877
content-filepath: ./issue_metrics.md
78+
labels: metrics # This line remains to keep labeling functionality
79+
80+
- name: Close PR report immediately
81+
uses: peter-evans/close-issue@v3
82+
with:
83+
issue-number: ${{ steps.create_pr_report.outputs.issue-number }}
84+
comment: 'PR metrics report issue automatically closed after creation. Labels are retained.'

0 commit comments

Comments
 (0)