mirror of
https://code.forgejo.org/docker/metadata-action.git
synced 2025-08-26 16:00:54 +00:00
don't handle default branch global exp for pr events
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
72fe50e2af
commit
0a72be43da
5 changed files with 7 additions and 19 deletions
|
@ -377,7 +377,7 @@ export class Meta {
|
|||
return '';
|
||||
},
|
||||
is_default_branch: function () {
|
||||
let branch = ctx.ref.replace(/^refs\/heads\//g, '');
|
||||
const branch = ctx.ref.replace(/^refs\/heads\//g, '');
|
||||
// TODO: "base_ref" is available in the push payload but doesn't always seem to
|
||||
// return the expected branch when the push tag event occurs. It's also not
|
||||
// documented in GitHub docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push
|
||||
|
@ -385,9 +385,6 @@ export class Meta {
|
|||
// if (/^refs\/tags\//.test(ctx.ref) && ctx.payload?.base_ref != undefined) {
|
||||
// branch = ctx.payload.base_ref.replace(/^refs\/heads\//g, '');
|
||||
// }
|
||||
if (/^refs\/pull\//.test(ctx.ref) && ctx.payload?.pull_request?.base?.ref != undefined) {
|
||||
branch = ctx.payload.pull_request.base.ref;
|
||||
}
|
||||
if (branch == undefined || branch.length == 0) {
|
||||
return 'false';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue