Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: isPullRequestFromFork returns false for any PR #1437

Merged
merged 7 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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 }}

Expand Down Expand Up @@ -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 }}
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/buildExec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading