Skip to content

Commit

Permalink
Merge pull request #19 from github/docs-updates
Browse files Browse the repository at this point in the history
Docs updates
  • Loading branch information
zkoppert authored Jun 14, 2023
2 parents 21b637b + 84b36c9 commit b9b525b
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ If you need support using this project or have questions about it, please [open
Note: Your GitHub token will need to have read access to the repository in the organization that you want evaluated
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`)

### Configuration

Below are the allowed configuration options:

| field | required | default | description |
|-----------------------|----------|---------|-------------|
| `GH_TOKEN` | true | | The GitHub Token used to scan the repository. Must have read access to all repository you are interested in scanning. |
| `REPOSITORY_URL` | true | | The repository to scan for issues. |
| `SEARCH_QUERY` | true | | The query by which you can filter issues/prs |

### Example workflow

```yaml
Expand All @@ -35,13 +45,11 @@ jobs:
build:
name: issue metrics
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

steps:

- name: Run issue-metrics tool
uses: docker://ghcr.io/github/issue-metrics:v1
uses: github/issue-metrics@v1
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
REPOSITORY_URL: https://github.com/owner/repo
Expand All @@ -57,7 +65,7 @@ jobs:
```

## SEARCH_QUERY: Issues or Pull Requests? Open or closed?
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. Here are some search query examples:
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:

Issues opened in May 2023:
- `is:issue created:2023-05-01..2023-05-31`
Expand Down Expand Up @@ -92,11 +100,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run issue-metrics tool for issues and prs opened in May 2023
uses: docker://ghcr.io/github/issue-metrics:v1
uses: github/issue-metrics:v1
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
REPOSITORY_URL: https://github.com/owner/repo
Expand All @@ -110,7 +116,7 @@ jobs:
assignees: <YOUR_GITHUB_HANDLE_HERE>

- name: Run issue-metrics tool for issues and prs closed in May 2023
uses: docker://ghcr.io/github/issue-metrics:v1
uses: github/issue-metrics:v1
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
REPOSITORY_URL: https://github.com/owner/repo
Expand Down

0 comments on commit b9b525b

Please sign in to comment.