Skip to content

Commit

Permalink
Fix @actions/github usage vs 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wjrogers committed Nov 17, 2020
1 parent 5026f73 commit 1d7df94
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const core = require("@actions/core");
const { context, GitHub } = require("@actions/github");
const { context, getOctokit } = require("@actions/github");
const fp = require("lodash/fp");
const fs = require("fs").promises;
const nodeFetch = require("node-fetch");
Expand Down Expand Up @@ -90,7 +90,7 @@ const getOctopusSpace = memoizeAsync(async (spaceName) => {

/**
* Discover the previous release's SHA by querying the Octopus Deploy API.
* @param {GitHub} github an authenticated octokit REST client
* @param {Octokit} github an authenticated octokit REST client
* @returns {Promise<string>} the SHA of the previous release, or undefined
*/
async function getPreviousRef(github) {
Expand Down Expand Up @@ -224,7 +224,7 @@ async function getPreviousRef(github) {

/**
* Get the commits since a base commit.
* @param {GitHub} github an authenticated octokit REST client
* @param {Octokit} github an authenticated octokit REST client
* @param {string} base the SHA of the base commit
* @returns {Promise<array>} an array of commit objects
*/
Expand Down Expand Up @@ -279,7 +279,7 @@ async function pushBuildInformation(spaceId, packageId, version, buildInformatio

async function run() {
try {
const github = new GitHub(inputs.githubToken);
const github = getOctokit(inputs.githubToken);
const previousRef = await getPreviousRef(github);

// compare the previous release to the current tag
Expand Down

0 comments on commit 1d7df94

Please sign in to comment.