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

Add [GitHubDiscussionsSearch] and GitHubRepoDiscussionsSearch service #9340

Merged

Conversation

jNullj
Copy link
Collaborator

@jNullj jNullj commented Jul 1, 2023

Add GitHub Discussions custom search service

This commit adds a GitHub Discussions custom search service in the github-discussions-custom-search.service.js file. It includes classes for global discussions search (GithubDiscussionsSearch) and repository-specific discussions search (GithubRepoDiscussionsSearch). Users can now search discussions with custom queries and retrieve the discussion count.

Fixes #9213

TODO:

  • Add functionality
  • Add tests

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2023

Messages
📖 ✨ Thanks for your contribution to Shields, @jNullj!

Generated by 🚫 dangerJS against 5776561

@jNullj jNullj changed the title Add [GitHubDiscussionsSearch] and [GitHubRepoDiscussionsSearch] service Add [GitHubDiscussionsSearch] and GitHubRepoDiscussionsSearch service Jul 1, 2023
@jNullj jNullj force-pushed the feat/9213/github-discussions-custom-search branch from 6f38564 to 7006a63 Compare July 1, 2023 10:27
@jNullj jNullj marked this pull request as ready for review July 1, 2023 10:38
@jNullj jNullj force-pushed the feat/9213/github-discussions-custom-search branch from 7006a63 to c269340 Compare July 1, 2023 19:11
@jNullj
Copy link
Collaborator Author

jNullj commented Jul 1, 2023

Did a rebase to latest commit on master

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

🚀 Updated review app: https://pr-9340-badges-shields.fly.dev

Copy link
Member

@chris48s chris48s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. This is basically done. Couple of comments but it is minor stuff

@chris48s chris48s changed the title Add [GitHubDiscussionsSearch] and GitHubRepoDiscussionsSearch service Add [GitHubDiscussionsSearch] and [GitHubRepoDiscussionsSearch] service Jul 7, 2023
jNullj and others added 4 commits July 7, 2023 23:04
This commit adds a GitHub Discussions custom search service in the github-discussions-custom-search.service.js file. It includes classes for global discussions search (GithubDiscussionsSearch) and repository-specific discussions search (GithubRepoDiscussionsSearch). Users can now search discussions with custom queries and retrieve the discussion count.

Fixes badges#9213
Inform users of filters and query values for the free search.
Change examples from filter by author to `filter` by `answered-by` as this has higher change of being a more common use case.
@jNullj jNullj force-pushed the feat/9213/github-discussions-custom-search branch from c269340 to 3fb024f Compare July 7, 2023 20:05
@jNullj
Copy link
Collaborator Author

jNullj commented Jul 7, 2023

@chris48s about the name change, the tests for GitHubRepoDiscussionsSearch are wihthin the test files for GitHubDiscussionsSearch similar to how it is done with the issuesSearch.
If you add [GitHubRepoDiscussionsSearch] to the title it will fail the test as this tester does not exist

notice the error for the tester job at this line

also did a rebase to latest commit at master

@chris48s chris48s changed the title Add [GitHubDiscussionsSearch] and [GitHubRepoDiscussionsSearch] service Add [GitHubDiscussionsSearch] and GitHubRepoDiscussionsSearch service Jul 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

🚀 Updated review app: https://pr-9340-badges-shields.fly.dev

@chris48s
Copy link
Member

chris48s commented Jul 7, 2023

Yes. Sorry I hadn't clocked that [GitHubDiscussionsSearch] was already running the tests for both classes - thanks.

This LGTM 👍 I will get it deployed over the weekend. Thanks

@chris48s chris48s added service-badge Accepted and actionable changes, features, and bugs squash when passing labels Jul 7, 2023
@repo-ranger repo-ranger bot merged commit 1251ada into badges:master Jul 7, 2023
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Same as issues/discussions for a repo but for a user only
2 participants