Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ibakshay committed Feb 9, 2023
1 parent a9e6bc9 commit d552edd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1904,6 +1904,7 @@ function updateFile(sha, claFileContent, reactedCommitters) {
return __awaiter(this, void 0, void 0, function* () {
const octokitInstance = isRemoteRepoOrOrgConfigured() ? (0, octokit_1.getPATOctokit)() : (0, octokit_1.getDefaultOctokitClient)();
const pullRequestNo = github_1.context.issue.number;
console.log(input.getSignedCommitMessage());
console.log(JSON.stringify(github_1.context.issue, null, 3));
claFileContent === null || claFileContent === void 0 ? void 0 : claFileContent.signedContributors.push(...reactedCommitters.newSigned);
let contentString = JSON.stringify(claFileContent, null, 2);
Expand All @@ -1917,13 +1918,14 @@ function updateFile(sha, claFileContent, reactedCommitters) {
? input
.getSignedCommitMessage()
.replace('$contributorName', github_1.context.actor)
.replace('$pullRequestNo', github_1.context.issue.number.toString())
.replace('$pullRequestNo', pullRequestNo.toString())
.replace('$owner', github_1.context.issue.owner)
.replace('$repo', github_1.context.issue.repo)
: `@${github_1.context.actor} has signed the CLA from Pull Request #${pullRequestNo}`,
content: contentBinary,
branch: input.getBranch()
});
console.log(input.getSignedCommitMessage());
});
}
exports.updateFile = updateFile;
Expand Down
4 changes: 3 additions & 1 deletion src/persistence/persistence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export async function updateFile(
isRemoteRepoOrOrgConfigured() ? getPATOctokit() : getDefaultOctokitClient()

const pullRequestNo = context.issue.number
console.log(input.getSignedCommitMessage())
console.log(JSON.stringify(context.issue, null, 3))
claFileContent?.signedContributors.push(...reactedCommitters.newSigned)
let contentString = JSON.stringify(claFileContent, null, 2)
Expand All @@ -57,13 +58,14 @@ export async function updateFile(
? input
.getSignedCommitMessage()
.replace('$contributorName', context.actor)
.replace('$pullRequestNo', context.issue.number.toString())
.replace('$pullRequestNo', pullRequestNo.toString())
.replace('$owner', context.issue.owner)
.replace('$repo', context.issue.repo)
: `@${context.actor} has signed the CLA from Pull Request #${pullRequestNo}`,
content: contentBinary,
branch: input.getBranch()
})
console.log(input.getSignedCommitMessage())
}

function isRemoteRepoOrOrgConfigured(): boolean {
Expand Down

0 comments on commit d552edd

Please sign in to comment.