This commit is contained in:
Stephan 2022-03-18 17:02:19 +01:00
parent efed3f3cc1
commit d6ed51a6f0

View File

@ -35,7 +35,7 @@ module.exports = /*async*/ ({github, context, core}) => {
} }
// github milestone must exist and be open // github milestone must exist and be open
const milestone = getMilestone() const milestone = await getMilestone()
if (milestone == null) { if (milestone == null) {
core.setFailed(`Could not find milestone '${version}'.`) core.setFailed(`Could not find milestone '${version}'.`)
return return
@ -113,7 +113,12 @@ module.exports = /*async*/ ({github, context, core}) => {
console.log(`Close milestone '${version}'.`) console.log(`Close milestone '${version}'.`)
const milestone = await getMilestone() const milestone = await getMilestone()
//... await restapi.issues.updateMilestone({
owner: context.repo.owner,
repo: context.repo.repo,
milestone_number: milestone.number,
state: "closed"
})
} }
async function getMilestone() { async function getMilestone() {