Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Merge Queue Event #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const core = __importStar(__nccwpck_require__(2186));
const github_1 = __nccwpck_require__(5438);
const minimatch_1 = __importDefault(__nccwpck_require__(3973));
function run() {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e, _f;
return __awaiter(this, void 0, void 0, function* () {
try {
// Create GitHub client with the API token.
Expand All @@ -54,6 +54,10 @@ function run() {
base = (_b = (_a = github_1.context.payload.pull_request) === null || _a === void 0 ? void 0 : _a.base) === null || _b === void 0 ? void 0 : _b.sha;
head = (_d = (_c = github_1.context.payload.pull_request) === null || _c === void 0 ? void 0 : _c.head) === null || _d === void 0 ? void 0 : _d.sha;
break;
case 'merge_group':
base = (_e = github_1.context.payload.merge_group) === null || _e === void 0 ? void 0 : _e.base_sha;
head = (_f = github_1.context.payload.merge_group) === null || _f === void 0 ? void 0 : _f.head_sha;
break;
case 'push':
base = github_1.context.payload.before;
head = github_1.context.payload.after;
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ async function run(): Promise<void> {
base = context.payload.pull_request?.base?.sha
head = context.payload.pull_request?.head?.sha
break
case 'merge_group':
base = context.payload.merge_group?.base_sha
head = context.payload.merge_group?.head_sha
break
case 'push':
base = context.payload.before
head = context.payload.after
Expand Down