From 18e4a41376d463fa2ed9dd450a4b37f376197058 Mon Sep 17 00:00:00 2001 From: Jaume Salgado Date: Thu, 5 Mar 2020 20:53:28 +0100 Subject: [PATCH] Fix "@octokit/rest" deprecation warning when using ".issues.addLabels()" --- CHANGELOG.md | 1 + source/platforms/github/GitHubUtils.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aa888b0a..f9c71d291 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ x - Update `parse-diff` library - [@417-72KI] - Fix repository slug in Jenkins provider - [sandratatarevicova] - Fix Typos across danger-js Repo - [@yohix] +- Fix `@octokit/rest` deprecation warning when using `.issues.addLabels()` - [@sogame] diff --git a/source/platforms/github/GitHubUtils.ts b/source/platforms/github/GitHubUtils.ts index af6fa0384..7fd0294bd 100644 --- a/source/platforms/github/GitHubUtils.ts +++ b/source/platforms/github/GitHubUtils.ts @@ -217,7 +217,7 @@ export const createOrAddLabel = (pr: GitHubPRDSL | undefined, api: GitHub) => as await api.issues.addLabels({ owner: config.owner, repo: config.repo, - number: config.id, + issue_number: config.id, labels: [labelConfig.name], }) }