chore: Clarify isPullRequestFromFork (#1411)

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref
2024-05-07 05:41:22 -04:00
committed by GitHub
parent 5ecb98a3c6
commit f691d469fb
3 changed files with 261 additions and 46 deletions

View File

@@ -29,7 +29,7 @@ const getGitService = (): string => {
return 'github';
};
const isFork = (): boolean => {
const isPullRequestFromFork = (): boolean => {
if (
`${context.eventName}` !== 'pull_request' ||
`${context.eventName}` !== 'pull_request_target'
@@ -45,7 +45,7 @@ const isFork = (): boolean => {
};
const getToken = async (): Promise<string> => {
if (isFork()) {
if (isPullRequestFromFork()) {
core.info('==> Fork detected, tokenless uploading used');
return Promise.resolve('');
}