You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This workflow searches for the issues created last month, and generates an issue with metrics. It also uses the `GH_TOKEN` to scan a different repository than the one the workflow file is in.
sed -i '/_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_/d' ./issue_metrics.md
209
+
echo "_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_" >> ./issue_metrics.md
210
+
211
+
- name: Create issue
212
+
uses: peter-evans/create-issue-from-file@v4
213
+
with:
214
+
title: Monthly issue metrics report (dev)
215
+
token: ${{ secrets.GITHUB_TOKEN }}
216
+
content-filepath: ./issue_metrics.md
217
+
assignees: <YOUR_GITHUB_HANDLE_HERE>
218
+
```
219
+
144
220
## SEARCH_QUERY
145
221
Issues or Pull Requests? Open or closed?
146
222
This action can be configured to run metrics on discussions, pull requests and/or issues. It is also configurable by whether they were open or closed in the specified time window. Further query options are listed in the [documentation on searching issues and pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests) or the [documentation on searching discussions](https://docs.github.com/en/search-github/searching-on-github/searching-discussions). Search results are limited to 1000 results by the GitHub API. Here are some search query examples:
@@ -169,7 +245,7 @@ Both issues and pull requests opened in May 2023:
169
245
Both issues and pull requests closed in May 2023 (may have been open in May or earlier):
170
246
- `repo:owner/repo closed:2023-05-01..2023-05-31`
171
247
172
-
OK, but what if I want both open or closed issues and pull requests? Due to limitations in issue search (no ability for OR logic), you will need to run the action twice, once for opened and once for closed. Here is an example workflow that does this:
248
+
OK, but what if I want both open or closed issues and pull requests? Due to limitations in issue search (no ability for OR logic), you will need to run the action twice, once for opened and once for closed. Here is an example workflow that does this:
173
249
174
250
```yaml
175
251
name: Monthly issue metrics
@@ -188,7 +264,7 @@ jobs:
188
264
runs-on: ubuntu-latest
189
265
190
266
steps:
191
-
267
+
192
268
- name: Run issue-metrics tool for issues and prs opened in May 2023
193
269
uses: github/issue-metrics@v2
194
270
env:
@@ -202,7 +278,7 @@ jobs:
202
278
token: ${{ secrets.GITHUB_TOKEN }}
203
279
content-filepath: ./issue_metrics.md
204
280
assignees: <YOUR_GITHUB_HANDLE_HERE>
205
-
281
+
206
282
- name: Run issue-metrics tool for issues and prs closed in May 2023
0 commit comments