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

How to make custom requests using ocktokit (for istance add specific query) #575

Open
fabriziogianni7 opened this issue Mar 22, 2023 · 2 comments
Projects

Comments

@fabriziogianni7
Copy link

fabriziogianni7 commented Mar 22, 2023

https://github.com/orgs/octokit/discussions/39
https://stackoverflow.com/questions/75813165/how-to-make-custom-requests-using-ocktokit-for-istance-add-specific-query

Hey guys I've been looking for this for a while but I don't understand how it works, please answer here on in stackoverflow if you want, here the description:

In my project, we use ocktokit to make requests to github. it's all good, except that I need to make custom queries on issues, for istance, I want to add:

-label:bot:ReadyToSign -label:Application:AddressNotValid

how should I do?
I tried using ockokit/request API and using something like that:

 let allGithubIssues = await  octokit.request(`GET /repos/{owner}/{repo}/issues?q=-label:bot:ReadyToSign`, {
      owner: "my-repo-owner",
      repo: "my-repo",
    });

but is not working.

I would like also to search for text into the comments or body of issues, something like

in:body or in:comments

@ghost ghost added this to Inbox in JS Mar 22, 2023
@wolfy1339
Copy link
Member

I'm not entirely sure how to do that kind of query using the requests module.

What you can do, is get all the issues for a repo, and then filter the data by looking through their tags and body

@fabriziogianni7
Copy link
Author

Yeah, I'm doing that but it's kind of slow. Would be amazing if I can submit a custom query somehow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔥 Backlog
JS
  
Inbox
Development

No branches or pull requests

2 participants