fix: avoid issue with case sensitivity of repo names (#1179)

* fix: avoid issue with case sensitivity in condition

* chore: upgrade jest to v28
This commit is contained in:
Peter Evans 2022-05-08 17:37:36 +09:00 committed by GitHub
parent af7c021bb9
commit f094b77505
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3926 additions and 1699 deletions

View file

@ -10,7 +10,7 @@ if [[ "$(docker images -q $IMAGE 2> /dev/null)" == "" || $ARG1 == "build" ]]; th
cat > Dockerfile << EOF
FROM node:12-alpine
RUN apk --no-cache add git git-daemon
RUN npm install jest --global
RUN npm install jest jest-environment-jsdom --global
WORKDIR /cpr
COPY __test__/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

2
dist/index.js vendored
View file

@ -968,7 +968,7 @@ class GitHubHelper {
}
catch (e) {
if (e.message &&
e.message.includes(`A pull request already exists for ${headBranch}`)) {
e.message.includes(`A pull request already exists for`)) {
core.info(`A pull request already exists for ${headBranch}`);
}
else {

5608
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -38,7 +38,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/jest": "^27.0.3",
"@types/jest": "^27.5.0",
"@types/node": "^16.11.11",
"@typescript-eslint/parser": "^5.5.0",
"@vercel/ncc": "^0.32.0",
@ -46,12 +46,13 @@
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-github": "^4.3.5",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^25.3.0",
"jest": "^27.4.3",
"jest-circus": "^27.4.2",
"eslint-plugin-jest": "^26.1.5",
"jest": "^28.1.0",
"jest-circus": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"js-yaml": "^4.1.0",
"prettier": "^2.5.0",
"ts-jest": "^27.0.7",
"ts-jest": "^28.0.2",
"typescript": "^4.5.2"
}
}

View file

@ -67,7 +67,7 @@ export class GitHubHelper {
} catch (e: any) {
if (
e.message &&
e.message.includes(`A pull request already exists for ${headBranch}`)
e.message.includes(`A pull request already exists for`)
) {
core.info(`A pull request already exists for ${headBranch}`)
} else {