Skip to content

Commit c9dbf6a

Browse files
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 <[email protected]>
1 parent 59fc46f commit c9dbf6a

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
file: ./coverage/coverage-final.json
4343
flags: version,${{ matrix.os }}
4444
name: codecov-version
45-
version: v0.2.0
45+
version: v0.6.0
4646
verbose: true
4747
token: ${{ secrets.CODECOV_TOKEN }}
4848

@@ -85,7 +85,7 @@ jobs:
8585
file: ./coverage/coverage-final.json
8686
flags: version,maxos-latest-xlarge
8787
name: codecov-version
88-
version: v0.2.0
88+
version: v0.6.0
8989
verbose: true
9090
token: ${{ secrets.CODECOV_TOKEN }}
9191

@@ -125,6 +125,6 @@ jobs:
125125
file: ./coverage/coverage-final.json
126126
flags: version,${{ matrix.os }}
127127
name: codecov-version
128-
version: v0.2.0
128+
version: v0.6.0
129129
verbose: true
130130
token: ${{ secrets.CODECOV_TOKEN }}

dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32340,7 +32340,8 @@ const getGitService = () => {
3234032340
return 'github';
3234132341
};
3234232342
const isPullRequestFromFork = () => {
32343-
if (`${context.eventName}` !== 'pull_request' ||
32343+
core.info(`evenName: ${context.eventName}`);
32344+
if (`${context.eventName}` !== 'pull_request' &&
3234432345
`${context.eventName}` !== 'pull_request_target') {
3234532346
return false;
3234632347
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/buildExec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ const getGitService = (): string => {
3030
};
3131

3232
const isPullRequestFromFork = (): boolean => {
33+
core.info(`evenName: ${context.eventName}`);
3334
if (
34-
`${context.eventName}` !== 'pull_request' ||
35+
`${context.eventName}` !== 'pull_request' &&
3536
`${context.eventName}` !== 'pull_request_target'
3637
) {
3738
return false;

0 commit comments

Comments
 (0)