Skip to content

Commit

Permalink
Fix post-results script
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Mar 2, 2024
1 parent 138c83e commit b83ded5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .changeset/swift-paws-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
6 changes: 3 additions & 3 deletions packages/dtslint-runner/src/post-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ type Errors = { path: string; error: string }[];

// Args: [auth token] [buildId] [status comment] [user to tag] [issue] [job status] [distinct id] [?main errors file] [?branch errors file]
async function main() {
const [auth, buildId, statusCommentId, userToTag, issue, status, distinctId, mainErrorsPath, branchErrorsPath] =
const [auth, buildId, statusCommentId, userToTag, issue, distinctId, status, mainErrorsPath, branchErrorsPath] =
process.argv.slice(2);
if (!auth) throw new Error("First argument must be a GitHub auth token.");
if (!buildId) throw new Error("Second argument must be a build id.");
if (!statusCommentId) throw new Error("Third argument must be a GitHub comment id.");
if (!userToTag) throw new Error("Fourth argument must be a GitHub username.");
if (!issue) throw new Error("Fifth argument must be a TypeScript issue/PR number.");
if (!status) throw new Error("Sixth argument must be a status ('ok' or 'fail').");
if (!distinctId) throw new Error("Seventh argument must be a distinct ID.");
if (!distinctId) throw new Error("Sixth argument must be a distinct ID.");
if (!status) throw new Error("Seventh argument must be a status ('ok' or 'fail').");

const gh = new Octokit({ auth });
const checkLogsMessage = `\n[You can check the log here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${buildId}&_a=summary).`;
Expand Down

0 comments on commit b83ded5

Please sign in to comment.