Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ibakshay committed Sep 20, 2024
1 parent 9dcbeda commit 18de0e1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 5 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ exports.getFileContent = getFileContent;
function createFile(contentBinary) {
return __awaiter(this, void 0, void 0, function* () {
const octokitInstance = isRemoteRepoOrOrgConfigured() ? (0, octokit_1.getPATOctokit)() : (0, octokit_1.getDefaultOctokitClient)();
console.log('createFile contentBinary', contentBinary);
return octokitInstance.repos.createOrUpdateFileContents({
owner: input.getRemoteOrgName() || github_1.context.repo.owner,
repo: input.getRemoteRepoName() || github_1.context.repo.repo,
Expand Down Expand Up @@ -532,11 +533,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const octokit_1 = __nccwpck_require__(3258);
const github_1 = __nccwpck_require__(5438);
const signatureComment_1 = __importDefault(__nccwpck_require__(1905));
const pullRequestCommentContent_1 = __nccwpck_require__(3621);
const octokit_1 = __nccwpck_require__(3258);
const getInputs_1 = __nccwpck_require__(3611);
const pullRequestCommentContent_1 = __nccwpck_require__(3621);
const signatureComment_1 = __importDefault(__nccwpck_require__(1905));
function prCommentSetup(committerMap, committers) {
return __awaiter(this, void 0, void 0, function* () {
const signed = (committerMap === null || committerMap === void 0 ? void 0 : committerMap.notSigned) && (committerMap === null || committerMap === void 0 ? void 0 : committerMap.notSigned.length) === 0;
Expand All @@ -555,6 +556,7 @@ function prCommentSetup(committerMap, committers) {
reactedCommitters.allSignedFlag = prepareAllSignedCommitters(committerMap, reactedCommitters.onlyCommitters, committers);
}
committerMap = prepareCommiterMap(committerMap, reactedCommitters);
console.log('committerMap', committerMap);
yield updateComment(reactedCommitters.allSignedFlag, committerMap, claBotComment);
return reactedCommitters;
}
Expand Down
4 changes: 3 additions & 1 deletion src/persistence/persistence.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { context } from '@actions/github'

import { ReactedCommitterMap } from '../interfaces'
import { GitHub } from '@actions/github/lib/utils'
import { ReactedCommitterMap } from '../interfaces'
import { getDefaultOctokitClient, getPATOctokit } from '../octokit'

import * as input from '../shared/getInputs'
Expand All @@ -23,6 +23,8 @@ export async function createFile(contentBinary): Promise<any> {
const octokitInstance: InstanceType<typeof GitHub> =
isRemoteRepoOrOrgConfigured() ? getPATOctokit() : getDefaultOctokitClient()

console.log('createFile contentBinary', contentBinary)

return octokitInstance.repos.createOrUpdateFileContents({
owner: input.getRemoteOrgName() || context.repo.owner,
repo: input.getRemoteRepoName() || context.repo.repo,
Expand Down
7 changes: 4 additions & 3 deletions src/pullrequest/pullRequestComment.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { octokit } from '../octokit'
import { context } from '@actions/github'
import signatureWithPRComment from './signatureComment'
import { commentContent } from './pullRequestCommentContent'
import {
CommitterMap,
CommittersDetails
} from '../interfaces'
import { octokit } from '../octokit'
import { getUseDcoFlag } from '../shared/getInputs'
import { commentContent } from './pullRequestCommentContent'
import signatureWithPRComment from './signatureComment'



Expand All @@ -28,6 +28,7 @@ export default async function prCommentSetup(committerMap: CommitterMap, committ
reactedCommitters.allSignedFlag = prepareAllSignedCommitters(committerMap, reactedCommitters.onlyCommitters, committers)
}
committerMap = prepareCommiterMap(committerMap, reactedCommitters)
console.log('committerMap', committerMap)
await updateComment(reactedCommitters.allSignedFlag, committerMap, claBotComment)
return reactedCommitters
}
Expand Down

0 comments on commit 18de0e1

Please sign in to comment.