From 1f7abbbd14e2d95194633ead05cd332e140ec12d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 09:48:14 +0300 Subject: [PATCH] Bump typescript from 4.7.4 to 4.8.2 (#106) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zois Pagoulatos --- package-lock.json | 15 ++++++++------- package.json | 2 +- src/milestone-actions.ts | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 564a3ba..25567fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "action-assign-milestone", "version": "1.0.0", "license": "MIT", "dependencies": { @@ -20,7 +21,7 @@ "eslint-plugin-github": "^4.3.7", "js-yaml": "^4.1.0", "prettier": "2.7.1", - "typescript": "^4.7.4" + "typescript": "^4.8.2" } }, "node_modules/@actions/core": { @@ -3045,9 +3046,9 @@ } }, "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", + "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -5391,9 +5392,9 @@ "dev": true }, "typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", + "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", "dev": true }, "unbox-primitive": { diff --git a/package.json b/package.json index 6cadc7b..f43e80c 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,6 @@ "eslint-plugin-github": "^4.3.7", "js-yaml": "^4.1.0", "prettier": "2.7.1", - "typescript": "^4.7.4" + "typescript": "^4.8.2" } } diff --git a/src/milestone-actions.ts b/src/milestone-actions.ts index 3861351..27a337a 100644 --- a/src/milestone-actions.ts +++ b/src/milestone-actions.ts @@ -1,11 +1,24 @@ import { context, getOctokit } from '@actions/github' import { graphql } from '@octokit/graphql' +type Milestone = { + title: string + number: number +} + +type Repository = { + repository: { + milestones: { + nodes: Milestone[] + } + } +} + const findMilestoneByName = async ( repoToken: string, milestoneName: string, ): Promise<{ title: string; id: number }> => { - const { repository } = await graphql({ + const { repository } = await graphql({ query: `query fetchMilestone($owner: String!, $repo: String!, $milestoneQuery: String!) { repository(owner:$owner, name:$repo) { milestones(query:$milestoneQuery, last: 1) {