fix: isPullRequestFromFork returns false for any PR (#1437)

* fix: isPullRequestFromFork returns false for any PR

* fix: add log statement

* fix: force set token

* fix: pass in empty string

* fix: bump version

* fix: revert to promise

* fix: revert changes

---------

Co-authored-by: Tom Hu <thomas.hu@sentry.io>
This commit is contained in:
shahar-h
2024-05-20 18:57:31 +07:00
committed by GitHub
co-authored by Tom Hu
parent 59fc46f14a
commit c9dbf6a905
4 changed files with 8 additions and 6 deletions
+3 -3
View File
@@ -42,7 +42,7 @@ jobs:
file: ./coverage/coverage-final.json
flags: version,${{ matrix.os }}
name: codecov-version
version: v0.2.0
version: v0.6.0
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
@@ -85,7 +85,7 @@ jobs:
file: ./coverage/coverage-final.json
flags: version,maxos-latest-xlarge
name: codecov-version
version: v0.2.0
version: v0.6.0
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
@@ -125,6 +125,6 @@ jobs:
file: ./coverage/coverage-final.json
flags: version,${{ matrix.os }}
name: codecov-version
version: v0.2.0
version: v0.6.0
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
+2 -1
View File
@@ -32340,7 +32340,8 @@ const getGitService = () => {
return 'github';
};
const isPullRequestFromFork = () => {
if (`${context.eventName}` !== 'pull_request' ||
core.info(`evenName: ${context.eventName}`);
if (`${context.eventName}` !== 'pull_request' &&
`${context.eventName}` !== 'pull_request_target') {
return false;
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -30,8 +30,9 @@ const getGitService = (): string => {
};
const isPullRequestFromFork = (): boolean => {
core.info(`evenName: ${context.eventName}`);
if (
`${context.eventName}` !== 'pull_request' ||
`${context.eventName}` !== 'pull_request' &&
`${context.eventName}` !== 'pull_request_target'
) {
return false;