* Update README * create structure for discussions landing page * is everything broken * [Universe] Dark mode (#16545) * Fix title * Add Discussions product * Correct title * Correct title * Move quickstart article * Move quickstart back out into article * Add and incorporate reusables * Move information about search * Draft conceptual information * Draft best practices * Draft further reading * Draft product introduction * Draft introduction * Add author metadata * Pluralize * Fix typos * Add introduction * Bump Octicons * Add some reusables * Add images * Revise article * Draft article * Change word * 🔪 the gerund * Add reusable * Revise introduction * Revise list * Simplify * Revise reusable * Fix reusable; add context * Rename reusable * Deduplicate conceptual information * 🔪 gerund * Add link to further reading * Move link and dispose of tip * Delete space * Add images * Add conceptual section * Add word * Delete newline * Revert package.json to state on main * Tweak images * Draft article * Add product name * Remove beta note * Use product name for future-proofing * Begin adding search information * Fix copypasta * little edits * build out a bit more of the guides content * Don't mention integrations for now * Escape quote * Remove authorship information for new defaults * Finish drafting article * Replace encoded character to match description * Revise away inline link * Accommodate 'for more information' in reusable * Fix links * Fix one last bit of copypasta * Update indices * Temporarily remove heading * Update introduction * Add new article 💀 * Remove commits from universe-2020-megabranch * Add article 💀 * update with a very rough draft * Add content about collaboration options to "About repositories" * Add content about discussions to "About issues" * Reorder content * Add is:discussion query * update with a few mmore fleshed out sections * update with more structure * Add reusable * Add screenshots * Clear way for actual procedural * Discussions landing page "Communities" section (#16692) * Make button Overview-able * Make card filtering more extensible * Guard for missing attributes * Use arbitrary dataset attributes * Add section with discussions-community-card * Tweak show more button behavior * Conditionally show "Show more" * Add beta_product frontmatter/label * Remove beta callout note * Hide changelog with no items * Finish importing community info * Fix borked markup * Omit search abr * Two columns should actually be two columns * Use org image, change card layout * Add two more examples * Fix title * Escape quote * Escape another quote * Draft article * Lower case * Relocate conceptual information * Update qualifier name * Draft article * Add conceptual information and links * Remove duplicative section * Fix copypasta * Revise reusable * Update link * Add content on categories * Lint the discussions YAML file * Update introduction and permissions * ⚓ * Reusablize; fix link * more planning content stuff * Escape quotes * Align prerequisites * Soften * Clean up prerequisites * Fix titles; version; add screenshot * Fix links * Actually fix links * Use better variable * Mention pinning * Update screenshots * Add screenshot * forgot to committ * update with reusable * add that screenshot * beef up landing page a bit * remove extra space * messed that up * fix hardcoded linkks weirdo * fix tests * update with permissions content * update with placeholder * filter out standalone category files from test * update * update @becca's ⚡ feedback * update with more feedback * so many updates * fix links * fix some more tests * flesh some more things out * update with further reading blah blah * fix some things * remove the gate-features label for beta ship only * Add discussions video to product landing page (#16759) * Add discussions video placeholder * This might work maybe * fix tests * apply all of @becca's and @lecoursen's ⚡ feedback ❤️ * rename to fix test * Revert "Add discussions video to product landing page (#16759)" This reverts commit 2247e5d0881ca6b36cee421218e8341a7cc12ac7. * update with test fix Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com> Co-authored-by: Laura Coursen <lecoursen@github.com> Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com> Co-authored-by: Jason Etcovitch <jasonetco@github.com> Co-authored-by: Sarah Schneider <sarahs@github.com>
115 lines
8.3 KiB
Markdown
115 lines
8.3 KiB
Markdown
---
|
|
title: Searching discussions
|
|
intro: You can search for discussions on {% data variables.product.product_name %} and narrow the results using search qualifiers.
|
|
versions:
|
|
free-pro-team: '*'
|
|
---
|
|
|
|
{% data reusables.discussions.beta %}
|
|
|
|
### About searching for discussions
|
|
|
|
You can search for discussions globally across all of {% data variables.product.product_name %}, or search for discussions within a particular organization or repository. For more information, see "[About searching on {% data variables.product.prodname_dotcom %}](/github/searching-for-information-on-github/about-searching-on-github)."
|
|
|
|
{% data reusables.search.syntax_tips %}
|
|
|
|
### Search by the title, body, or comments
|
|
|
|
With the `in` qualifier you can restrict your search for discussions to the title, body, or comments. You can also combine qualifiers to search a combination of title, body, or comments. When you omit the `in` qualifier, {% data variables.product.product_name %} searches the title, body, and comments.
|
|
|
|
| Qualifier | Example |
|
|
| :- | :- |
|
|
| `in:title` | [**welcome in:title**](https://github.com/search?q=welcome+in%3Atitle&type=Discussions) matches discussions with "welcome" in the title. |
|
|
| `in:body` | [**onboard in:title,body**](https://github.com/search?q=onboard+in%3Atitle%2Cbody&type=Discussions) matches discussions with "onboard" in the title or body. |
|
|
| `in:comments` | [**thanks in:comments**](https://github.com/search?q=thanks+in%3Acomment&type=Discussions) matches discussions with "thanks" in the comments for the discussion. |
|
|
|
|
### Search within a user's or organization's repositories
|
|
|
|
To search discussions in all repositories owned by a certain user or organization, you can use the `user` or `org` qualifier. To search discussions in a specific repository, you can use the `repo` qualifier.
|
|
|
|
| Qualifier | Example |
|
|
| :- | :- |
|
|
| <code>user:<em>USERNAME</em></code> | [**user:octocat feedback**](https://github.com/search?q=user%3Aoctocat+feedback&type=Discussions) matches discussions with the word "feedback" from repositories owned by @octocat. |
|
|
| <code>org:<em>ORGNAME</em></code> | [**org:github**](https://github.com/search?q=org%3Agithub&type=Discussions&utf8=%E2%9C%93) matches discussions in repositories owned by the GitHub organization. |
|
|
| <code>repo:<em>USERNAME/REPOSITORY</em></code> | [**repo:nodejs/node created:<2021-01-01**](https://github.com/search?q=repo%3Anodejs%2Fnode+created%3A%3C2020-01-01&type=Discussions) matches discussions from @nodejs' Node.js runtime project that were created before January 2021. |
|
|
|
|
### Filter by repository visibility
|
|
|
|
You can filter by the visibility of the repository containing the discussions using the `is` qualifier. For more information, see "[About repository visibility](/github/creating-cloning-and-archiving-repositories/about-repository-visibility)."
|
|
|
|
| Qualifier | Example
|
|
| :- | :- |{% if currentVersion == "free-pro-team@latest" or enterpriseServerVersions contains currentVersion %}
|
|
| `is:public` | [**is:public**](https://github.com/search?q=is%3Apublic&type=Discussions) matches discussions in public repositories.{% endif %}
|
|
| `is:internal` | [**is:internal**](https://github.com/search?q=is%3Ainternal&type=Discussions) matches discussions in internal repositories.
|
|
| `is:private` | [**is:private tiramisu**](https://github.com/search?q=is%3Aprivate+tiramisu&type=Discussions) matches discussions that contain the word "tiramisu" in private repositories you can access.
|
|
|
|
### Search by author
|
|
|
|
The `author` qualifier finds discussions created by a certain user.
|
|
|
|
| Qualifier | Example |
|
|
| :- | :- |
|
|
| <code>author:<em>USERNAME</em></code> | [**cool author:octocat**](https://github.com/search?q=cool+author%3Aoctocat&type=Discussions) matches discussions with the word "cool" that were created by @octocat. |
|
|
| | [**bootstrap in:body author:octocat**](https://github.com/search?q=bootstrap+in%3Abody+author%3Aoctocat&type=Discussions) matches discussions created by @octocat that contain the word "bootstrap" in the body. |
|
|
|
|
### Search by commenter
|
|
|
|
The `commenter` qualifier finds discussions that contain a comment from a certain user.
|
|
|
|
| Qualifier | Example |
|
|
| :- | :- |
|
|
| <code>commenter:<em>USERNAME</em></code> | [**github commenter:becca org:github**](https://github.com/search?utf8=%E2%9C%93&q=github+commenter%3Abecca+org%3Agithub&type=Discussions) matches discussions in repositories owned by GitHub, that contain the word "github," and have a comment by @becca.
|
|
|
|
### Search by a user that's involved in a discussion
|
|
|
|
You can use the `involves` qualifier to find discussions that involve a certain user. The qualifier returns discussions that were either created by a certain user, mention the user, or contain comments by the user. The `involves` qualifier is a logical OR between the `author`, `mentions`, and `commenter` qualifiers for a single user.
|
|
|
|
| Qualifier | Example |
|
|
| :- | :- |
|
|
| <code>involves:<em>USERNAME</em></code> | **[involves:becca involves:octocat](https://github.com/search?q=involves%3Abecca+involves%3Aoctocat&type=Discussions)** matches discussions either @becca or @octocat are involved in.
|
|
| | [**NOT beta in:body involves:becca**](https://github.com/search?q=NOT+beta+in%3Abody+involves%3Abecca&type=Discussions) matches discussions @becca is involved in that do not contain the word "beta" in the body.
|
|
|
|
### Search by number of comments
|
|
|
|
You can use the `comments` qualifier along with greater than, less than, and range qualifiers to search by the number of comments. For more information, see "[Understanding the search syntax](/github/searching-for-information-on-github/understanding-the-search-syntax)."
|
|
|
|
| Qualifier | Example |
|
|
| :- | :- |
|
|
| <code>comments:<em>n</em></code> | [**comments:>100**](https://github.com/search?q=comments%3A%3E100&type=Discussions) matches discussions with more than 100 comments.
|
|
| | [**comments:500..1000**](https://github.com/search?q=comments%3A500..1000&type=Discussions) matches discussions with comments ranging from 500 to 1,000.
|
|
|
|
### Search by number of interactions
|
|
|
|
You can filter discussions by the number of interactions with the `interactions` qualifier along with greater than, less than, and range qualifiers. The interactions count is the number of reactions and comments on a discussion. For more information, see "[Understanding the search syntax](/github/searching-for-information-on-github/understanding-the-search-syntax)."
|
|
|
|
| Qualifier | Example |
|
|
| :- | :- |
|
|
| <code>interactions:<em>n</em></code> | [** interactions:>2000**](https://github.com/search?q=interactions%3A%3E2000) matches discussions with more than 2,000 interactions.
|
|
| | [**interactions:500..1000**](https://github.com/search?q=interactions%3A500..1000) matches discussions with interactions ranging from 500 to 1,000.
|
|
|
|
### Search by number of reactions
|
|
|
|
You can filter discussions by the number of reactions using the `reactions` qualifier along with greater than, less than, and range qualifiers. For more information, see "[Understanding the search syntax](/github/searching-for-information-on-github/understanding-the-search-syntax)."
|
|
|
|
| Qualifier | Example |
|
|
| :- | :- |
|
|
| <code>reactions:<em>n</em></code> | [** reactions:>1000**](https://github.com/search?q=reactions%3A%3E500) matches discussions with more than 500 reactions.
|
|
| | [**reactions:500..1000**](https://github.com/search?q=reactions%3A500..1000) matches discussions with reactions ranging from 500 to 1,000.
|
|
|
|
### Search by when a discussion was created or last updated
|
|
|
|
You can filter discussions based on times of creation, or when the discussion was last updated. For discussion creation, you can use the `created` qualifier; to find out when an discussion was last updated, use the `updated` qualifier.
|
|
|
|
Both qualifiers take a date as a parameter. {% data reusables.time_date.date_format %} {% data reusables.time_date.time_format %}
|
|
|
|
{% data reusables.search.date_gt_lt %}
|
|
|
|
| Qualifier | Example |
|
|
| :- | :- |
|
|
| <code>created:<em>YYYY-MM-DD</em></code> | [**created:>2020-11-15**](https://github.com/search?q=created%3A%3E%3D2020-11-15&type=discussions) matches discussions that were created after November 15, 2020.
|
|
| <code>updated:<em>YYYY-MM-DD</em></code> | [**weird in:body updated:>=2020-02-01**](https://github.com/search?q=weird+in%3Abody+updated%3A%3E%3D2020-12-01&type=Discussions) matches discussions with the word "weird" in the body that were updated after December 2020.
|
|
|
|
### Further reading
|
|
|
|
- "[Sorting search results](/articles/sorting-search-results/)"
|