Skip to content

Commit bddcf10

Browse files
committed
Fix deprecation warnings in experiment sync script
1 parent 1603066 commit bddcf10

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

scripts/update-experimental-branches.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,21 @@ async function main() {
3434
["git", ["remote", "add", "fork", remoteUrl]], // Add the remote fork
3535
]);
3636

37-
const gh = new Octokit();
38-
gh.authenticate({
39-
type: "token",
40-
token: process.argv[2]
37+
const gh = new Octokit({
38+
auth: process.argv[2]
4139
});
4240
for (const numRaw of prnums) {
4341
const num = +numRaw;
4442
if (num) {
4543
// PR number rather than branch name - lookup info
46-
const inputPR = await gh.pulls.get({ owner: "Microsoft", repo: "TypeScript", number: num });
44+
const inputPR = await gh.pulls.get({ owner: "Microsoft", repo: "TypeScript", pull_number: num });
4745
// GH calculates the rebaseable-ness of a PR into its target, so we can just use that here
4846
if (!inputPR.data.rebaseable) {
4947
if (+triggeredPR === num) {
5048
await gh.issues.createComment({
5149
owner: "Microsoft",
5250
repo: "TypeScript",
53-
number: num,
51+
issue_number: num,
5452
body: `This PR is configured as an experiment, and currently has merge conflicts with master - please rebase onto master and fix the conflicts.`
5553
});
5654
throw new Error(`Merge conflict detected in PR ${num} with master`);

0 commit comments

Comments
 (0)