Skip to content

Commit

Permalink
fix: bug fix + remove unwanted files
Browse files Browse the repository at this point in the history
  • Loading branch information
ibakshay committed Sep 20, 2024
1 parent ea72bdd commit 8eac7d4
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 57 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/notify-about-new-pr-via-slack.yml

This file was deleted.

50 changes: 45 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.commentContent = void 0;
const input = __importStar(__nccwpck_require__(3611));
const pr_sign_comment_1 = __nccwpck_require__(6718);
function commentContent(signed, committerMap) {
// using a `string` true or false purposely as github action input cannot have a boolean value
if (input.getUseDcoFlag() == 'true') {
Expand Down Expand Up @@ -715,7 +716,7 @@ function cla(signed, committerMap) {
let lineOne = (input.getCustomNotSignedPrComment() || `<br/>Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that $you sign our [Contributor License Agreement](${input.getPathToDocument()}) before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.<br/>`).replace('$you', you);
let text = `${lineOne}
- - -
${input.getCustomPrSignComment() || "I have read the CLA Document and I hereby sign the CLA"}
${(0, pr_sign_comment_1.getPrSignComment)()}
- - -
`;
if (committersCount > 1 && committerMap && committerMap.signed && committerMap.notSigned) {
Expand Down Expand Up @@ -930,13 +931,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.setupClaCheck = void 0;
const core = __importStar(__nccwpck_require__(2186));
const github_1 = __nccwpck_require__(5438);
const checkAllowList_1 = __nccwpck_require__(3661);
const graphql_1 = __importDefault(__nccwpck_require__(5157));
const pullRequestComment_1 = __importDefault(__nccwpck_require__(3326));
const github_1 = __nccwpck_require__(5438);
const persistence_1 = __nccwpck_require__(5802);
const pullRequestComment_1 = __importDefault(__nccwpck_require__(3326));
const pullRerunRunner_1 = __nccwpck_require__(4766);
const core = __importStar(__nccwpck_require__(2186));
function setupClaCheck() {
return __awaiter(this, void 0, void 0, function* () {
let committerMap = getInitialCommittersMap();
Expand Down Expand Up @@ -974,7 +975,7 @@ function getCLAFileContentandSHA(committers, committerMap) {
result = yield (0, persistence_1.getFileContent)();
}
catch (error) {
if (error.status === 404) {
if (error.status === "404") {
return createClaFileAndPRComment(committers, committerMap);
}
else {
Expand Down Expand Up @@ -1089,6 +1090,45 @@ const lockPullRequestAfterMerge = () => core.getInput('lock-pullrequest-aftermer
exports.lockPullRequestAfterMerge = lockPullRequestAfterMerge;


/***/ }),

/***/ 6718:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getPrSignComment = void 0;
const input = __importStar(__nccwpck_require__(3611));
function getPrSignComment() {
return input.getCustomPrSignComment() || "I have read the CLA Document and I hereby sign the CLA";
}
exports.getPrSignComment = getPrSignComment;


/***/ }),

/***/ 7351:
Expand Down
29 changes: 0 additions & 29 deletions src/blockChainWebhook.ts

This file was deleted.

8 changes: 4 additions & 4 deletions src/setupClaCheck.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import * as core from '@actions/core'
import { context } from '@actions/github'
import { checkAllowList } from './checkAllowList'
import getCommitters from './graphql'
import prCommentSetup from './pullrequest/pullRequestComment'
import {
ClafileContentAndSha,
CommitterMap,
CommittersDetails,
ReactedCommitterMap
} from './interfaces'
import { context } from '@actions/github'
import {
createFile,
getFileContent,
updateFile
} from './persistence/persistence'
import prCommentSetup from './pullrequest/pullRequestComment'
import { reRunLastWorkFlowIfRequired } from './pullRerunRunner'
import * as core from '@actions/core'

export async function setupClaCheck() {
let committerMap = getInitialCommittersMap()
Expand Down Expand Up @@ -64,7 +64,7 @@ async function getCLAFileContentandSHA(
try {
result = await getFileContent()
} catch (error) {
if (error.status === 404) {
if (error.status === "404") {
return createClaFileAndPRComment(committers, committerMap)
} else {
throw new Error(
Expand Down

0 comments on commit 8eac7d4

Please sign in to comment.