I want to get my repo’s issues that created by my GithubApp Bot by using REST API. It means I don’t want to get the issues only created by user.
I noticed that there is a list-repository-issues api, and there is a parameter called “creator”. I guess maybe I can use it, so I tried it. But failed. Is there a way to acheive that? Here is my code:
async function getIssues(githubToken: string, page: number = 1) {
const result = await axios({
method: 'get',
params: {
labels: "label",
per_page: 20,
page: page,
},
url: `https://api.github.com/repos/nyanpasuspace/maoji/issues`,
headers: {
accept: 'application/json',
Authorization: `Bearer ${githubToken}`,
'X-GitHub-Api-Version': '2022-11-28'
},
});
return result.data;
}
New contributor
mao is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.