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 is a GitHub Action that searches for pull requests/issues in a repository and measures
5
+
This is a GitHub Action that searches for pull requests/issues/discussions in a repository and measures
6
6
the time to first response for each one. It then calculates the average time
7
-
to first response and writes the issues/pull requests with their time to first response and time to close
8
-
to a Markdown file. The issues/pull requests to search for can be filtered by using a search query.
7
+
to first response and writes the issues/pull requests/discussions with their metrics
8
+
to a Markdown file. The issues/pull requests/discussions to search for can be filtered by using a search query.
9
9
10
10
This action was developed by the GitHub OSPO for our own use and developed in a way that we could open source it that it might be useful to you as well! If you want to know more about how we use it, reach out in an issue in this repository.
11
11
@@ -25,7 +25,7 @@ If you need support using this project or have questions about it, please [open
25
25
## Use as a GitHub Action
26
26
27
27
1. Create a repository to host this GitHub Action or select an existing repository.
28
-
1. Create the env values from the sample workflow below (GH_TOKEN, REPOSITORY_URL, SEARCH_QUERY) with your information as repository secrets. More info on creating secrets can be found [here](https://docs.github.com/en/actions/security-guides/encrypted-secrets).
28
+
1. Create the env values from the sample workflow below (GH_TOKEN, SEARCH_QUERY) with your information as repository secrets. More info on creating secrets can be found [here](https://docs.github.com/en/actions/security-guides/encrypted-secrets).
29
29
Note: Your GitHub token will need to have read access to the repository in the organization that you want evaluated
30
30
1. Copy the below example workflow to your repository and put it in the `.github/workflows/` directory with the file extension `.yml` (ie. `.github/workflows/issue-metrics.yml`)
31
31
@@ -36,8 +36,7 @@ Below are the allowed configuration options:
This action can be configured to run metrics on 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 search documentation](https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests). Here are some search query examples:
Both issues and pull requests closed in May 2023 (may have been open in May or earlier):
149
-
-`closed:2023-05-01..2023-05-31`
146
+
-`repo:owner/repo closed:2023-05-01..2023-05-31`
150
147
151
148
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:
1. Fill out the `.env` file with a _token_ from a user that has access to the organization to scan (listed below). Tokens should have admin:org or read:org access.
221
-
1. Fill out the `.env` file with the _repository_url_ of the repository to scan
222
217
1. Fill out the `.env` file with the _search_query_ to filter issues by
223
218
1.`pip install -r requirements.txt`
224
219
1. Run `python3 ./issue_metrics.py`, which will output issue metrics data
0 commit comments