Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
michalziolkowski committed Mar 23, 2024
1 parent 76c4e75 commit 59e97a0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/action/release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78602,6 +78602,7 @@ const github = __importStar(__nccwpck_require__(81207));
const cli_1 = __nccwpck_require__(80313);
function run() {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b;
try {
const android = core.getInput('android', { required: false });
const ios = core.getInput('ios', { required: false });
Expand All @@ -78610,16 +78611,20 @@ function run() {
console.log(JSON.stringify(context, null, 2));
let gitInfo = {
commitHash: (context === null || context === void 0 ? void 0 : context.sha.slice(0, 7)) || 'unknown',
branchName: 'unknown',
branchName: (context === null || context === void 0 ? void 0 : context.ref.split('refs/heads/')[1]) || 'unknown',
commitName: 'unknown',
};
switch (context === null || context === void 0 ? void 0 : context.eventName) {
case 'push':
// const commitName = context?.payload.break;
const commitName = (_b = (_a = context === null || context === void 0 ? void 0 : context.payload) === null || _a === void 0 ? void 0 : _a.head_commit) === null || _b === void 0 ? void 0 : _b.message;
if (commitName) {
gitInfo = Object.assign(Object.assign({}, gitInfo), { commitName });
}
break;
default:
break;
}
console.log('gitInfo', gitInfo);
const test = true;
if (test)
return;
Expand Down

0 comments on commit 59e97a0

Please sign in to comment.