Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): bump @actions/github from 4.0.0 to 5.0.0 #407

Merged
merged 3 commits into from
May 17, 2021

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 17, 2021

Bumps @actions/github from 4.0.0 to 5.0.0.

Changelog

Sourced from @​actions/github's changelog.

5.0.0

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels May 17, 2021
@ybiquitous ybiquitous self-assigned this May 17, 2021
@github-actions
Copy link
Contributor

npm diff --diff=@actions/github@4.0.0 --diff=@actions/github@5.0.0 --diff-unified=2
diff --git a/lib/context.js b/lib/context.js
index v4.0.0..v5.0.0 100644
--- a/lib/context.js
+++ b/lib/context.js
@@ -9,4 +9,5 @@
      */
     constructor() {
+        var _a, _b, _c;
         this.payload = {};
         if (process.env.GITHUB_EVENT_PATH) {
@@ -28,4 +29,7 @@
         this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
         this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
+        this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
+        this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;
+        this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;
     }
     get issue() {
diff --git a/lib/github.js b/lib/github.js
index v4.0.0..v5.0.0 100644
--- a/lib/github.js
+++ b/lib/github.js
@@ -15,5 +15,5 @@
     if (mod && mod.__esModule) return mod;
     var result = {};
-    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
     __setModuleDefault(result, mod);
     return result;
diff --git a/lib/internal/utils.js b/lib/internal/utils.js
index v4.0.0..v5.0.0 100644
--- a/lib/internal/utils.js
+++ b/lib/internal/utils.js
@@ -15,5 +15,5 @@
     if (mod && mod.__esModule) return mod;
     var result = {};
-    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
     __setModuleDefault(result, mod);
     return result;
diff --git a/lib/utils.js b/lib/utils.js
index v4.0.0..v5.0.0 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -15,5 +15,5 @@
     if (mod && mod.__esModule) return mod;
     var result = {};
-    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
     __setModuleDefault(result, mod);
     return result;
diff --git a/package.json b/package.json
index v4.0.0..v5.0.0 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
   "name": "@actions/github",
-  "version": "4.0.0",
+  "version": "5.0.0",
   "description": "Actions github lib",
   "keywords": [
@@ -7,5 +7,5 @@
     "actions"
   ],
-  "homepage": "https://github.com/actions/toolkit/tree/master/packages/github",
+  "homepage": "https://github.com/actions/toolkit/tree/main/packages/github",
   "license": "MIT",
   "main": "lib/github.js",
@@ -28,5 +28,5 @@
   },
   "scripts": {
-    "audit-moderate": "npm install && npm audit --audit-level=moderate",
+    "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
     "test": "jest",
     "build": "tsc",
@@ -39,12 +39,12 @@
   },
   "dependencies": {
-    "@actions/http-client": "^1.0.8",
-    "@octokit/core": "^3.0.0",
-    "@octokit/plugin-paginate-rest": "^2.2.3",
-    "@octokit/plugin-rest-endpoint-methods": "^4.0.0"
+    "@actions/http-client": "^1.0.11",
+    "@octokit/core": "^3.4.0",
+    "@octokit/plugin-paginate-rest": "^2.13.3",
+    "@octokit/plugin-rest-endpoint-methods": "^5.1.1"
   },
   "devDependencies": {
-    "jest": "^25.1.0",
-    "proxy": "^1.0.1"
+    "jest": "^26.6.3",
+    "proxy": "^1.0.2"
   }
 }
diff --git a/lib/context.js.map b/lib/context.js.map
index v4.0.0..v5.0.0 100644
--- a/lib/context.js.map
+++ b/lib/context.js.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;AAEA,2BAA2C;AAC3C,2BAAsB;AAEtB,MAAa,OAAO;IAgBlB;;OAEG;IACH;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,IAAI,eAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CA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AO,EAAC,KAAK,EAAE,IAAI,EAAC,CAAA;SACrB;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3B,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK;gBAC1C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI;aACnC,CAAA;SACF;QAED,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAA;IACH,CAAC;CACF;AA3ED,0BA2EC"}
\ No newline at end of file
diff --git a/README.md b/README.md
index v4.0.0..v5.0.0 100644
--- a/README.md
+++ b/README.md
@@ -23,5 +23,5 @@
     // const octokit = github.getOctokit(myToken, {userAgent: "MyActionVersion1"});
 
-    const { data: pullRequest } = await octokit.pulls.get({
+    const { data: pullRequest } = await octokit.rest.pulls.get({
         owner: 'octokit',
         repo: 'rest.js',
@@ -51,5 +51,5 @@
 const context = github.context;
 
-const newIssue = await octokit.issues.create({
+const newIssue = await octokit.rest.issues.create({
   ...context.repo,
   title: 'New issue!',
@@ -91,5 +91,5 @@
 const myOctokit = new octokit(getOctokitOptions(token))
 // Create a new user
-myOctokit.enterpriseAdmin.createUser({
+myOctokit.rest.enterpriseAdmin.createUser({
   login: "testuser",
   email: "testuser@test.com",
diff --git a/lib/context.d.ts b/lib/context.d.ts
index v4.0.0..v5.0.0 100644
--- a/lib/context.d.ts
+++ b/lib/context.d.ts
@@ -14,4 +14,7 @@
     runNumber: number;
     runId: number;
+    apiUrl: string;
+    serverUrl: string;
+    graphqlUrl: string;
     /**
      * Hydrate the context from the environment
diff --git a/lib/utils.d.ts b/lib/utils.d.ts
index v4.0.0..v5.0.0 100644
--- a/lib/utils.d.ts
+++ b/lib/utils.d.ts
@@ -3,12 +3,5 @@
 import { OctokitOptions } from '@octokit/core/dist-types/types';
 export declare const context: Context.Context;
-export declare const GitHub: (new (...args: any[]) => {
-    [x: string]: any;
-}) & {
-    new (...args: any[]): {
-        [x: string]: any;
-    };
-    plugins: any[];
-} & typeof Octokit & import("@octokit/core/dist-types/types").Constructor<import("@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types").RestEndpointMethods & {
+export declare const GitHub: typeof Octokit & import("@octokit/core/dist-types/types").Constructor<import("@octokit/plugin-rest-endpoint-methods/dist-types/types").Api & {
     paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
 }>;
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index v4.0.0..v5.0.0 
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -0,0 +1,9 @@
+The MIT License (MIT)
+
+Copyright 2019 GitHub
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

Posted by ybiquitous/npm-diff-action

@ybiquitous ybiquitous changed the title build(deps): bump @actions/github from 4.0.0 to 5.0.0 fix(deps): bump @actions/github from 4.0.0 to 5.0.0 May 17, 2021
@ybiquitous ybiquitous merged commit 606a6fc into main May 17, 2021
@ybiquitous ybiquitous deleted the dependabot/npm_and_yarn/actions/github-5.0.0 branch May 17, 2021 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant