Skip to content

Commit da9a4fd

Browse files
Merge pull request #337 from technote-space/release/next-v4.3.1
release: v4.3.2
2 parents 6df633b + cb82ba7 commit da9a4fd

File tree

4 files changed

+69
-57
lines changed

4 files changed

+69
-57
lines changed

__tests__/git-helper.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ describe('GitHelper', () => {
267267

268268
execCalledWith(mockExec, [
269269
'git checkout -b test-branch origin/test-branch || :',
270+
'git checkout test-branch || :',
270271
]);
271272
});
272273
});
@@ -814,14 +815,19 @@ describe('GitHelper', () => {
814815
execCalledWith(mockExec, [
815816
'git clone \'--branch=test\' \'--depth=3\' \'https://octocat:[email protected]/hello/world.git\' \'.\' > /dev/null 2>&1 || :',
816817
'git checkout -b abc origin/abc || :',
818+
'git checkout abc || :',
817819
'git clone \'--branch=test\' \'--depth=3\' origin \'.\' > /dev/null 2>&1 || :',
818820
'git checkout -b abc origin/abc || :',
821+
'git checkout abc || :',
819822
'git clone \'--branch=test\' \'--depth=3\' test \'.\' > /dev/null 2>&1 || :',
820823
'git checkout -b abc test/abc || :',
824+
'git checkout abc || :',
821825
'git clone \'--branch=test\' \'--depth=3\' origin \'.\' || :',
822826
'git checkout -b abc origin/abc || :',
827+
'git checkout abc || :',
823828
'git clone \'--branch=test\' \'--depth=3\' \'https://octocat:[email protected]/hello/world.git\' \'.\' > /dev/null 2>&1 || :',
824829
'git checkout -b abc origin/abc || :',
830+
'git checkout abc || :',
825831
]);
826832
});
827833
});

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@technote-space/github-action-helper",
3-
"version": "4.3.1",
3+
"version": "4.3.2",
44
"description": "Helper for GitHub Action.",
55
"keywords": [
66
"github",
@@ -47,13 +47,13 @@
4747
"@technote-space/github-action-test-helper": "^0.6.4",
4848
"@types/jest": "^26.0.15",
4949
"@types/node": "^14.14.9",
50-
"@typescript-eslint/eslint-plugin": "^4.8.1",
51-
"@typescript-eslint/parser": "^4.8.1",
50+
"@typescript-eslint/eslint-plugin": "^4.8.2",
51+
"@typescript-eslint/parser": "^4.8.2",
5252
"eslint": "^7.14.0",
5353
"husky": "^4.3.0",
5454
"jest": "^26.6.3",
5555
"jest-circus": "^26.6.3",
56-
"lint-staged": "^10.5.1",
56+
"lint-staged": "^10.5.2",
5757
"nock": "^13.0.5",
5858
"ts-jest": "^26.4.4",
5959
"typescript": "^4.1.2"

src/git-helper.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,12 @@ export default class GitHelper {
327327
suppressError: this.shouldSuppressError(),
328328
stderrToStdout: true,
329329
});
330+
await this.runCommand(workDir, {
331+
command: 'git checkout',
332+
args: [branch],
333+
suppressError: this.shouldSuppressError(),
334+
stderrToStdout: true,
335+
});
330336
};
331337

332338
/**

yarn.lock

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232
"@babel/highlight" "^7.10.4"
3333

3434
"@babel/core@^7.1.0", "@babel/core@^7.7.5":
35-
version "7.12.7"
36-
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.7.tgz#bf55363c08c8352a37691f7216ec30090bf7e3bf"
37-
integrity sha512-tRKx9B53kJe8NCGGIxEQb2Bkr0riUIEuN7Sc1fxhs5H8lKlCWUvQCSNMVIB0Meva7hcbCRJ76de15KoLltdoqw==
35+
version "7.12.8"
36+
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.8.tgz#8ad76c1a7d2a6a3beecc4395fa4f7b4cb88390e6"
37+
integrity sha512-ra28JXL+5z73r1IC/t+FT1ApXU5LsulFDnTDntNfLQaScJUJmcHL5Qxm/IWanCToQk3bPWQo5bflbplU5r15pg==
3838
dependencies:
3939
"@babel/code-frame" "^7.10.4"
4040
"@babel/generator" "^7.12.5"
4141
"@babel/helper-module-transforms" "^7.12.1"
4242
"@babel/helpers" "^7.12.5"
4343
"@babel/parser" "^7.12.7"
4444
"@babel/template" "^7.12.7"
45-
"@babel/traverse" "^7.12.7"
45+
"@babel/traverse" "^7.12.8"
4646
"@babel/types" "^7.12.7"
4747
convert-source-map "^1.7.0"
4848
debug "^4.1.0"
@@ -271,10 +271,10 @@
271271
"@babel/parser" "^7.12.7"
272272
"@babel/types" "^7.12.7"
273273

274-
"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.7":
275-
version "7.12.7"
276-
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.7.tgz#572a722408681cef17d6b0bef69ef2e728ca69f1"
277-
integrity sha512-nMWaqsQEeSvMNypswUDzjqQ+0rR6pqCtoQpsqGJC4/Khm9cISwPTSpai57F6/jDaOoEGz8yE/WxcO3PV6tKSmQ==
274+
"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.8":
275+
version "7.12.8"
276+
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.8.tgz#c1c2983bf9ba0f4f0eaa11dff7e77fa63307b2a4"
277+
integrity sha512-EIRQXPTwFEGRZyu6gXbjfpNORN1oZvwuzJbxcXjAgWV0iqXYDszN1Hx3FVm6YgZfu1ZQbCVAk3l+nIw95Xll9Q==
278278
dependencies:
279279
"@babel/code-frame" "^7.10.4"
280280
"@babel/generator" "^7.12.5"
@@ -896,74 +896,74 @@
896896
dependencies:
897897
"@types/yargs-parser" "*"
898898

899-
"@typescript-eslint/eslint-plugin@^4.8.1":
900-
version "4.8.1"
901-
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.1.tgz#b362abe0ee478a6c6d06c14552a6497f0b480769"
902-
integrity sha512-d7LeQ7dbUrIv5YVFNzGgaW3IQKMmnmKFneRWagRlGYOSfLJVaRbj/FrBNOBC1a3tVO+TgNq1GbHvRtg1kwL0FQ==
899+
"@typescript-eslint/eslint-plugin@^4.8.2":
900+
version "4.8.2"
901+
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.2.tgz#cf9102ec800391caa574f589ffe0623cca1d9308"
902+
integrity sha512-gQ06QLV5l1DtvYtqOyFLXD9PdcILYqlrJj2l+CGDlPtmgLUzc1GpqciJFIRvyfvgLALpnxYINFuw+n9AZhPBKQ==
903903
dependencies:
904-
"@typescript-eslint/experimental-utils" "4.8.1"
905-
"@typescript-eslint/scope-manager" "4.8.1"
904+
"@typescript-eslint/experimental-utils" "4.8.2"
905+
"@typescript-eslint/scope-manager" "4.8.2"
906906
debug "^4.1.1"
907907
functional-red-black-tree "^1.0.1"
908908
regexpp "^3.0.0"
909909
semver "^7.3.2"
910910
tsutils "^3.17.1"
911911

912-
"@typescript-eslint/[email protected].1":
913-
version "4.8.1"
914-
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.1.tgz#27275c20fa4336df99ebcf6195f7d7aa7aa9f22d"
915-
integrity sha512-WigyLn144R3+lGATXW4nNcDJ9JlTkG8YdBWHkDlN0lC3gUGtDi7Pe3h5GPvFKMcRz8KbZpm9FJV9NTW8CpRHpg==
912+
"@typescript-eslint/[email protected].2":
913+
version "4.8.2"
914+
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.2.tgz#8909a5732f19329cf5ef0c39766170476bff5e50"
915+
integrity sha512-hpTw6o6IhBZEsQsjuw/4RWmceRyESfAiEzAEnXHKG1X7S5DXFaZ4IO1JO7CW1aQ604leQBzjZmuMI9QBCAJX8Q==
916916
dependencies:
917917
"@types/json-schema" "^7.0.3"
918-
"@typescript-eslint/scope-manager" "4.8.1"
919-
"@typescript-eslint/types" "4.8.1"
920-
"@typescript-eslint/typescript-estree" "4.8.1"
918+
"@typescript-eslint/scope-manager" "4.8.2"
919+
"@typescript-eslint/types" "4.8.2"
920+
"@typescript-eslint/typescript-estree" "4.8.2"
921921
eslint-scope "^5.0.0"
922922
eslint-utils "^2.0.0"
923923

924-
"@typescript-eslint/parser@^4.8.1":
925-
version "4.8.1"
926-
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.8.1.tgz#4fe2fbdbb67485bafc4320b3ae91e34efe1219d1"
927-
integrity sha512-QND8XSVetATHK9y2Ltc/XBl5Ro7Y62YuZKnPEwnNPB8E379fDsvzJ1dMJ46fg/VOmk0hXhatc+GXs5MaXuL5Uw==
924+
"@typescript-eslint/parser@^4.8.2":
925+
version "4.8.2"
926+
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.8.2.tgz#78dccbe5124de2b8dea2d4c363dee9f769151ca8"
927+
integrity sha512-u0leyJqmclYr3KcXOqd2fmx6SDGBO0MUNHHAjr0JS4Crbb3C3d8dwAdlazy133PLCcPn+aOUFiHn72wcuc5wYw==
928928
dependencies:
929-
"@typescript-eslint/scope-manager" "4.8.1"
930-
"@typescript-eslint/types" "4.8.1"
931-
"@typescript-eslint/typescript-estree" "4.8.1"
929+
"@typescript-eslint/scope-manager" "4.8.2"
930+
"@typescript-eslint/types" "4.8.2"
931+
"@typescript-eslint/typescript-estree" "4.8.2"
932932
debug "^4.1.1"
933933

934-
"@typescript-eslint/[email protected].1":
935-
version "4.8.1"
936-
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.1.tgz#e343c475f8f1d15801b546cb17d7f309b768fdce"
937-
integrity sha512-r0iUOc41KFFbZdPAdCS4K1mXivnSZqXS5D9oW+iykQsRlTbQRfuFRSW20xKDdYiaCoH+SkSLeIF484g3kWzwOQ==
934+
"@typescript-eslint/[email protected].2":
935+
version "4.8.2"
936+
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.2.tgz#a18388c63ae9c17adde519384f539392f2c4f0d9"
937+
integrity sha512-qHQ8ODi7mMin4Sq2eh/6eu03uVzsf5TX+J43xRmiq8ujng7ViQSHNPLOHGw/Wr5dFEoxq/ubKhzClIIdQy5q3g==
938938
dependencies:
939-
"@typescript-eslint/types" "4.8.1"
940-
"@typescript-eslint/visitor-keys" "4.8.1"
939+
"@typescript-eslint/types" "4.8.2"
940+
"@typescript-eslint/visitor-keys" "4.8.2"
941941

942-
"@typescript-eslint/[email protected].1":
943-
version "4.8.1"
944-
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.1.tgz#23829c73c5fc6f4fcd5346a7780b274f72fee222"
945-
integrity sha512-ave2a18x2Y25q5K05K/U3JQIe2Av4+TNi/2YuzyaXLAsDx6UZkz1boZ7nR/N6Wwae2PpudTZmHFXqu7faXfHmA==
942+
"@typescript-eslint/[email protected].2":
943+
version "4.8.2"
944+
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.2.tgz#c862dd0e569d9478eb82d6aee662ea53f5661a36"
945+
integrity sha512-z1/AVcVF8ju5ObaHe2fOpZYEQrwHyZ7PTOlmjd3EoFeX9sv7UekQhfrCmgUO7PruLNfSHrJGQvrW3Q7xQ8EoAw==
946946

947-
"@typescript-eslint/[email protected].1":
948-
version "4.8.1"
949-
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.1.tgz#7307e3f2c9e95df7daa8dc0a34b8c43b7ec0dd32"
950-
integrity sha512-bJ6Fn/6tW2g7WIkCWh3QRlaSU7CdUUK52shx36/J7T5oTQzANvi6raoTsbwGM11+7eBbeem8hCCKbyvAc0X3sQ==
947+
"@typescript-eslint/[email protected].2":
948+
version "4.8.2"
949+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.2.tgz#eeec34707d8577600fb21661b5287226cc8b3bed"
950+
integrity sha512-HToGNwI6fekH0dOw3XEVESUm71Onfam0AKin6f26S2FtUmO7o3cLlWgrIaT1q3vjB3wCTdww3Dx2iGq5wtUOCg==
951951
dependencies:
952-
"@typescript-eslint/types" "4.8.1"
953-
"@typescript-eslint/visitor-keys" "4.8.1"
952+
"@typescript-eslint/types" "4.8.2"
953+
"@typescript-eslint/visitor-keys" "4.8.2"
954954
debug "^4.1.1"
955955
globby "^11.0.1"
956956
is-glob "^4.0.1"
957957
lodash "^4.17.15"
958958
semver "^7.3.2"
959959
tsutils "^3.17.1"
960960

961-
"@typescript-eslint/[email protected].1":
962-
version "4.8.1"
963-
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.1.tgz#794f68ee292d1b2e3aa9690ebedfcb3a8c90e3c3"
964-
integrity sha512-3nrwXFdEYALQh/zW8rFwP4QltqsanCDz4CwWMPiIZmwlk9GlvBeueEIbq05SEq4ganqM0g9nh02xXgv5XI3PeQ==
961+
"@typescript-eslint/[email protected].2":
962+
version "4.8.2"
963+
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.2.tgz#62cd3fbbbf65f8eccfbe6f159eb1b84a243a3f77"
964+
integrity sha512-Vg+/SJTMZJEKKGHW7YC21QxgKJrSbxoYYd3MEUGtW7zuytHuEcksewq0DUmo4eh/CTNrVJGSdIY9AtRb6riWFw==
965965
dependencies:
966-
"@typescript-eslint/types" "4.8.1"
966+
"@typescript-eslint/types" "4.8.2"
967967
eslint-visitor-keys "^2.0.0"
968968

969969
JSONStream@^1.0.4:
@@ -3342,10 +3342,10 @@ lines-and-columns@^1.1.6:
33423342
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
33433343
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
33443344

3345-
lint-staged@^10.5.1:
3346-
version "10.5.1"
3347-
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.1.tgz#901e915c2360072dded0e7d752a0d9a49e079daa"
3348-
integrity sha512-fTkTGFtwFIJJzn/PbUO3RXyEBHIhbfYBE7+rJyLcOXabViaO/h6OslgeK6zpeUtzkDrzkgyAYDTLAwx6JzDTHw==
3345+
lint-staged@^10.5.2:
3346+
version "10.5.2"
3347+
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.2.tgz#acfaa0093af3262aee3130b2e22438941530bdd1"
3348+
integrity sha512-e8AYR1TDlzwB8VVd38Xu2lXDZf6BcshVqKVuBQThDJRaJLobqKnpbm4dkwJ2puypQNbLr9KF/9mfA649mAGvjA==
33493349
dependencies:
33503350
chalk "^4.1.0"
33513351
cli-truncate "^2.1.0"

0 commit comments

Comments
 (0)