debug payload without contents
This commit is contained in:
parent
3563849c8a
commit
36bba202e3
2 changed files with 30 additions and 3 deletions
18
dist/index.js
vendored
18
dist/index.js
vendored
|
@ -313,6 +313,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __rest = (this && this.__rest) || function (s, e) {
|
||||||
|
var t = {};
|
||||||
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||||
|
t[p] = s[p];
|
||||||
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||||
|
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||||
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||||
|
t[p[i]] = s[p[i]];
|
||||||
|
}
|
||||||
|
return t;
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.createPullRequest = createPullRequest;
|
exports.createPullRequest = createPullRequest;
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
|
@ -325,6 +336,7 @@ const git_config_helper_1 = __nccwpck_require__(8384);
|
||||||
const utils = __importStar(__nccwpck_require__(918));
|
const utils = __importStar(__nccwpck_require__(918));
|
||||||
function createPullRequest(inputs) {
|
function createPullRequest(inputs) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
var _a;
|
||||||
let gitConfigHelper, git;
|
let gitConfigHelper, git;
|
||||||
try {
|
try {
|
||||||
core.startGroup('Prepare git configuration');
|
core.startGroup('Prepare git configuration');
|
||||||
|
@ -574,7 +586,11 @@ function createPullRequest(inputs) {
|
||||||
commitMessage: inputs.commitMessage,
|
commitMessage: inputs.commitMessage,
|
||||||
fileChanges: fileChanges
|
fileChanges: fileChanges
|
||||||
};
|
};
|
||||||
core.info(`Push commit with payload: '${JSON.stringify(pushCommitVars)}'`);
|
const pushCommitVarsWithoutContents = Object.assign(Object.assign({}, pushCommitVars), { fileChanges: Object.assign(Object.assign({}, pushCommitVars.fileChanges), { additions: (_a = pushCommitVars.fileChanges.additions) === null || _a === void 0 ? void 0 : _a.map(addition => {
|
||||||
|
const { contents } = addition, rest = __rest(addition, ["contents"]);
|
||||||
|
return rest;
|
||||||
|
}) }) });
|
||||||
|
core.debug(`Push commit with payload: '${JSON.stringify(pushCommitVarsWithoutContents)}'`);
|
||||||
const commit = yield graphqlWithAuth(pushCommitMutation, pushCommitVars);
|
const commit = yield graphqlWithAuth(pushCommitMutation, pushCommitVars);
|
||||||
core.debug(`Pushed commit - '${JSON.stringify(commit)}'`);
|
core.debug(`Pushed commit - '${JSON.stringify(commit)}'`);
|
||||||
core.info(`Pushed commit with hash - '${commit.createCommitOnBranch.commit.oid}' on branch - '${commit.createCommitOnBranch.ref.name}'`);
|
core.info(`Pushed commit with hash - '${commit.createCommitOnBranch.commit.oid}' on branch - '${commit.createCommitOnBranch.ref.name}'`);
|
||||||
|
|
|
@ -379,8 +379,19 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
|
||||||
fileChanges: fileChanges
|
fileChanges: fileChanges
|
||||||
}
|
}
|
||||||
|
|
||||||
core.info(
|
const pushCommitVarsWithoutContents = {
|
||||||
`Push commit with payload: '${JSON.stringify(pushCommitVars)}'`
|
...pushCommitVars,
|
||||||
|
fileChanges: {
|
||||||
|
...pushCommitVars.fileChanges,
|
||||||
|
additions: pushCommitVars.fileChanges.additions?.map(addition => {
|
||||||
|
const {contents, ...rest} = addition
|
||||||
|
return rest
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
core.debug(
|
||||||
|
`Push commit with payload: '${JSON.stringify(pushCommitVarsWithoutContents)}'`
|
||||||
)
|
)
|
||||||
|
|
||||||
const commit = await graphqlWithAuth<{
|
const commit = await graphqlWithAuth<{
|
||||||
|
|
Loading…
Reference in a new issue