Skip to content

Commit

Permalink
adding some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
srinivas-jay committed Jul 26, 2023
1 parent ad5e668 commit 5c2e794
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44303,7 +44303,18 @@ function validateInputs(inputs) {
}

async function isCommitMadeByAction(gitClient, userName, userEmail) {
console.log('userName: ', userName);
console.log('userEmail: ', userEmail);
const latestCommit = await gitClient.log({ maxCount: 1 });
console.log('latestCommit.latest: ', latestCommit?.latest);
console.log(
'latestCommit.latest.author_email: ',
latestCommit?.latest?.author_email
);
console.log(
'latestCommit.latest.author_name: ',
latestCommit?.latest?.author_name
);
if (
latestCommit &&
latestCommit.latest &&
Expand Down Expand Up @@ -47470,6 +47481,8 @@ async function run() {

const versionCommand = core.getInput('version-command');
const publishCommand = core.getInput('publish-command');
const commitMsg = core.getInput('commit-message');
const commitTitle = core.getInput('commit-title');

// Get the event that triggered the action
const { context } = github;
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ async function run() {

const versionCommand = core.getInput('version-command');
const publishCommand = core.getInput('publish-command');
const commitMsg = core.getInput('commit-message');
const commitTitle = core.getInput('commit-title');

// Get the event that triggered the action
const { context } = github;
Expand Down
11 changes: 11 additions & 0 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@ export function validateInputs(inputs) {
}

export async function isCommitMadeByAction(gitClient, userName, userEmail) {
console.log('userName: ', userName);
console.log('userEmail: ', userEmail);
const latestCommit = await gitClient.log({ maxCount: 1 });
console.log('latestCommit.latest: ', latestCommit?.latest);
console.log(
'latestCommit.latest.author_email: ',
latestCommit?.latest?.author_email
);
console.log(
'latestCommit.latest.author_name: ',
latestCommit?.latest?.author_name
);
if (
latestCommit &&
latestCommit.latest &&
Expand Down

0 comments on commit 5c2e794

Please sign in to comment.