diff --git a/scripts/notion/GithubNotionSync.js b/scripts/notion/GithubNotionSync.js index 78a8e98..a13d554 100644 --- a/scripts/notion/GithubNotionSync.js +++ b/scripts/notion/GithubNotionSync.js @@ -10,6 +10,10 @@ class GithubNotionSync { }; } + /** + * @returns array of urls in the following form: + * https://api.github.com/repos/${this.org}/${repo_name}/issues + */ async getAllIssueUrls() { let repos = await fetch(`${this.urls.base}orgs/${this.org}/repos`, { headers: { @@ -22,6 +26,21 @@ class GithubNotionSync { ); } + /** + * @param repoIssueUrl element of array returned by `getAllIssueUrls()` + * @returns array of issues for the given repo in the following json form: + * ``` + * { + * url: 'https://api.github.com/repos/fosscord/fosscord-api/issues/78', + * title: '[Route] /guilds/:id/regions', + * body: '- [ ] regions', + * number: 78, + * state: 'open', + * label: 'Route', + * assignee: 'Stylix58' + * } + * ``` + */ async getAllIssuesPerRepo(repoIssueUrl) { let issues = await fetch(repoIssueUrl, { headers: {