-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for accept_ms_testers_without_closed_task (#41)
- Loading branch information
1 parent
46d294f
commit e1be7a8
Showing
3 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const yaml = require("js-yaml"); | ||
const { octokit } = require("./actions/octokit"); | ||
|
||
exports.getMobsuccessYMLFromRepo = async function getMobsuccessYMLFromRepo({ | ||
owner, | ||
repo, | ||
}) { | ||
try { | ||
const { data } = await octokit.rest.repos.getContent({ | ||
owner, | ||
repo, | ||
path: ".mobsuccess.yml", | ||
}); | ||
const content = Buffer.from(data.content, "base64").toString("utf8"); | ||
return yaml.load(content); | ||
} catch (e) { | ||
return {}; | ||
} | ||
}; |