Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
fix: changes from last to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Raphael committed Jan 11, 2021
1 parent e69e69e commit 475bde8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 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.

16 changes: 8 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ async function run() {
const owner = repository.split('/')[0];
const repo = repository.split('/')[1];
const pull_number = core.getInput('pull_number');

core.info(`setting repository to ${repository}`);
core.info(`setting owner to ${owner}`);
core.info(`setting repo to ${repo}`);

const token = core.getInput('token');
const octokit = github.getOctokit(token);

Expand All @@ -23,13 +23,13 @@ async function run() {
});

core.info(`pullRequestCommits ${pullRequestCommits}`);
const last_commit = pullRequestCommits[-1, pullRequestCommits.length - 1];
core.info(`last_commit.sha: ${last_commit.sha}`);
core.info(`last_commit.message: ${last_commit.commit.message}`);
const latest_commit = pullRequestCommits[-1, pullRequestCommits.length - 1];
core.info(`latest_commit.sha: ${latest_commit.sha}`);
core.info(`latest_commit.message: ${latest_commit.commit.message}`);

core.setOutput('LATEST_COMMIT_SHA', latest_commit.sha);
core.setOutput('LATEST_COMMIT_MESSAGE', latest_commit.commit.message);

core.setOutput('LAST_COMMIT_SHA', last_commit.sha);
core.setOutput('LAST_COMMIT_MESSAGE', last_commit.commit.message);

} catch (error) {
core.setFailed(error.message);
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "javascript-action",
"version": "1.0.6",
"version": "1.0.7",
"description": "JavaScript Action Template",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 475bde8

Please sign in to comment.