mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-11 05:27:24 +00:00
fix: cleanup
This commit is contained in:
parent
c690ee9cc4
commit
2189dc5037
4 changed files with 14 additions and 14 deletions
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
|
@ -9,10 +9,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.1.4
|
uses: actions/checkout@v4.1.4
|
||||||
- name: Dump GitHub context
|
|
||||||
env:
|
|
||||||
GITHUB_CONTEXT: ${{ toJSON(github) }}
|
|
||||||
run: echo "$GITHUB_CONTEXT"
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Lint
|
- name: Lint
|
||||||
|
|
|
||||||
9
dist/index.js
vendored
9
dist/index.js
vendored
|
|
@ -32563,15 +32563,16 @@ const getGitService = () => {
|
||||||
return 'github';
|
return 'github';
|
||||||
};
|
};
|
||||||
const isFork = () => {
|
const isFork = () => {
|
||||||
|
if (`${context.eventName}` !== 'pull_request' ||
|
||||||
|
`${context.eventName}` !== 'pull_request_target') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const baseLabel = context.payload.pull_request.base.label;
|
const baseLabel = context.payload.pull_request.base.label;
|
||||||
const headLabel = context.payload.pull_request.head.label;
|
const headLabel = context.payload.pull_request.head.label;
|
||||||
core.info(`base: ${baseLabel} | head: ${headLabel}`);
|
core.info(`baseRef: ${baseLabel} | headRef: ${headLabel}`);
|
||||||
return (baseLabel.split(':')[0] !== headLabel.split(':')[0]);
|
return (baseLabel.split(':')[0] !== headLabel.split(':')[0]);
|
||||||
};
|
};
|
||||||
const getToken = () => buildExec_awaiter(void 0, void 0, void 0, function* () {
|
const getToken = () => buildExec_awaiter(void 0, void 0, void 0, function* () {
|
||||||
const baseLabel = context.payload.pull_request.base.label;
|
|
||||||
const headLabel = context.payload.pull_request.head.label;
|
|
||||||
core.info(`base: ${baseLabel} | head: ${headLabel}`);
|
|
||||||
if (isFork()) {
|
if (isFork()) {
|
||||||
core.info('==> Fork detected, tokenless uploading used');
|
core.info('==> Fork detected, tokenless uploading used');
|
||||||
return Promise.resolve('');
|
return Promise.resolve('');
|
||||||
|
|
|
||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -30,18 +30,21 @@ const getGitService = (): string => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const isFork = (): boolean => {
|
const isFork = (): boolean => {
|
||||||
|
if (
|
||||||
|
`${context.eventName}` !== 'pull_request' ||
|
||||||
|
`${context.eventName}` !== 'pull_request_target'
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const baseLabel = context.payload.pull_request.base.label;
|
const baseLabel = context.payload.pull_request.base.label;
|
||||||
const headLabel = context.payload.pull_request.head.label;
|
const headLabel = context.payload.pull_request.head.label;
|
||||||
|
|
||||||
core.info(`base: ${baseLabel} | head: ${headLabel}`);
|
core.info(`baseRef: ${baseLabel} | headRef: ${headLabel}`);
|
||||||
return (baseLabel.split(':')[0] !== headLabel.split(':')[0]);
|
return (baseLabel.split(':')[0] !== headLabel.split(':')[0]);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getToken = async (): Promise<string> => {
|
const getToken = async (): Promise<string> => {
|
||||||
const baseLabel = context.payload.pull_request.base.label;
|
|
||||||
const headLabel = context.payload.pull_request.head.label;
|
|
||||||
|
|
||||||
core.info(`base: ${baseLabel} | head: ${headLabel}`);
|
|
||||||
if (isFork()) {
|
if (isFork()) {
|
||||||
core.info('==> Fork detected, tokenless uploading used');
|
core.info('==> Fork detected, tokenless uploading used');
|
||||||
return Promise.resolve('');
|
return Promise.resolve('');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue