sveltejs/discord-bot

Commands to search the svelte github repos for issues, prs and discussions and send the top 5ish results

gtm-nayan opened this issue · 0 comments

Can be done using the Github API.

I'm mostly a n00b at graph ql, this is the query that I came up with in the python version, improvements appreciated

query searchResults($type: SearchType!, $query: String!) {
	search(type: $type, query: $query, first: 5) {
		nodes {
			... on Discussion {
				title
				number
				url
			}
			... on Issue {
				title
				number
				url
			}
			... on PullRequest {
				title
				number
				url
			}
		}
	}
}

where the $query variable uses is:... to filter the stuff.

Also need a access token for the api.