Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for discussions searching #34

Merged
merged 2 commits into from
Jun 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ to a Markdown file. The issues/pull requests/discussions to search for can be fi

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.

To find syntax for search queries, check out the [documentation](https://docs.github.com/en/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests).
To find syntax for search queries, check out 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).

## Example use cases

Expand All @@ -36,7 +36,7 @@ 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. |
| `SEARCH_QUERY` | true | | The query by which you can filter issues/prs which must contain a `repo:` entry or an `org:` entry. For discussions, include `type:discussion` in the query. |
| `SEARCH_QUERY` | true | | The query by which you can filter issues/prs which must contain a `repo:` entry or an `org:` entry. For discussions, include `type:discussions` in the query. |

### Example workflows

Expand Down Expand Up @@ -125,7 +125,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. 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:
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). Here are some search query examples:

Issues opened in May 2023:
- `repo:owner/repo is:issue created:2023-05-01..2023-05-31`
Expand All @@ -140,7 +140,10 @@ Pull requests closed in May 2023 (may have been open in May or earlier):
- `repo:owner/repo is:pr closed:2023-05-01..2023-05-31`

Discussions opened in May 2023:
- `repo:owner/repo type:discussion created:2023-05-01..2023-05-31`
- `repo:owner/repo type:discussions created:2023-05-01..2023-05-31`

Discussions opened in May 2023 with category of engineering and label of question:
- `repo:owner/repo type:discussions created:2023-05-01..2023-05-31 category:engineering label:"question"`

Both issues and pull requests opened in May 2023:
- `repo:owner/repo created:2023-05-01..2023-05-31`
Expand Down