Skip to content

Commit

Permalink
HACK: Rewrite context.ref for pull_request_target action.
Browse files Browse the repository at this point in the history
Fixes docker#90.
  • Loading branch information
mithro committed May 23, 2021
1 parent e856afa commit 15f1e09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import {Context} from '@actions/github/lib/context';
import {ReposGetResponseData} from '@octokit/types';

export function context(): Context {
if (github.context.eventName=='pull_request_target') {
github.context.ref=`refs/pull/${github.context.payload.number}/merge`;
}
return github.context;
}

Expand Down

0 comments on commit 15f1e09

Please sign in to comment.