Overwrite pull_request_target pr number

This commit is contained in:
Tom Hu
2021-03-29 18:11:53 -04:00
parent fcebab03f2
commit d9a1bbc2da
5 changed files with 12 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
## 1.3.2
- # Overwrites pr number for pull_request_target events
## 1.3.1 ## 1.3.1
### Fixes ### Fixes

3
dist/index.js vendored
View File

@@ -59636,6 +59636,9 @@ var buildExec = function () {
if (overridePr) { if (overridePr) {
execArgs.push('-P', "" + overridePr); execArgs.push('-P', "" + overridePr);
} }
else if ("" + context.eventName == 'pull_request_target') {
execArgs.push('-P', "" + context.payload.number);
}
if (overrideTag) { if (overrideTag) {
execArgs.push('-T', "" + overrideTag); execArgs.push('-T', "" + overrideTag);
} }

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "codecov-action", "name": "codecov-action",
"version": "1.3.1", "version": "1.3.2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "codecov-action", "name": "codecov-action",
"version": "1.3.1", "version": "1.3.2",
"description": "Upload coverage reports to Codecov from GitHub Actions", "description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@@ -143,6 +143,10 @@ const buildExec = () => {
} }
if (overridePr) { if (overridePr) {
execArgs.push('-P', `${overridePr}`); execArgs.push('-P', `${overridePr}`);
} else if (
`${context.eventName}` == 'pull_request_target'
) {
execArgs.push('-P', `${context.payload.number}`);
} }
if (overrideTag) { if (overrideTag) {
execArgs.push('-T', `${overrideTag}`); execArgs.push('-T', `${overrideTag}`);