fix: close issue with number, not id

pull/1309/head v10.32.3
Rhys Arkins 2017-12-18 13:35:30 +01:00
parent 57c33c280a
commit 464ebc4277
1 changed files with 2 additions and 1 deletions

View File

@ -472,9 +472,10 @@ async function ensureIssueClosing(title) {
logger.debug(`ensureIssueClosing()`);
const issueList = await getIssueList();
for (const issue of issueList) {
logger.info({ issue }, 'Closing issue');
if (issue.title === title) {
await get.patch(
`repos/${config.parentRepo || config.repoName}/issues/${issue.id}`,
`repos/${config.parentRepo || config.repoName}/issues/${issue.number}`,
{
body: { state: 'closed' },
}