add complex custom command integration test

This commit is contained in:
Jesse Duffield 2022-01-15 09:58:58 +11:00
parent 8263d15b03
commit f5b9ad8c00
34 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,31 @@
disableStartupPopups: true
customCommands:
- key: 'N'
description: 'Add file'
context: 'localBranches'
command: 'echo "{{index .PromptResponses 0}} {{index .PromptResponses 1}} {{index .PromptResponses 2}} {{ .SelectedLocalBranch.Name }}" > output.txt'
loadingText: 'Running custom command...'
prompts:
- type: 'menuFromCommand'
title: 'Title'
command: 'git log --oneline --pretty=%B'
filter: '(?P<commit_message>.*)'
valueFormat: '{{ .commit_message }}'
labelFormat: '{{ .commit_message | yellow }}'
- type: 'input'
title: 'Description'
initialValue: "{{ if .SelectedLocalBranch.Name }}Branch: #{{ .SelectedLocalBranch.Name }}{{end}}"
- type: 'menu'
title: 'yes or no'
options:
- name: 'no'
value: 'false'
- name: 'yes'
value: 'true'
gui:
theme:
activeBorderColor:
- green
- bold
SelectedRangeBgcolor:
- reverse

View file

@ -0,0 +1 @@
ref: refs/heads/master

View file

@ -0,0 +1,10 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
email = CI@example.com
name = CI

View file

@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View file

@ -0,0 +1,7 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
.DS_Store

View file

@ -0,0 +1,5 @@
0000000000000000000000000000000000000000 ab38b1ca116f77648925d952e731f419db360cdb CI <CI@example.com> 1642201096 +1100 commit (initial): myfile1
ab38b1ca116f77648925d952e731f419db360cdb 4fdfedfd9d406506be8b02f5b863dbc08d43cc9f CI <CI@example.com> 1642201096 +1100 commit: myfile2
4fdfedfd9d406506be8b02f5b863dbc08d43cc9f 7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 CI <CI@example.com> 1642201096 +1100 commit: myfile3
7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 f708d3e3819470a69f6c8562ff1e68eef02f8cac CI <CI@example.com> 1642201096 +1100 commit: myfile4
f708d3e3819470a69f6c8562ff1e68eef02f8cac 5428838691c97ac192c8b8e1c3f573d8541a94b6 CI <CI@example.com> 1642201104 +1100 commit: test

View file

@ -0,0 +1,5 @@
0000000000000000000000000000000000000000 ab38b1ca116f77648925d952e731f419db360cdb CI <CI@example.com> 1642201096 +1100 commit (initial): myfile1
ab38b1ca116f77648925d952e731f419db360cdb 4fdfedfd9d406506be8b02f5b863dbc08d43cc9f CI <CI@example.com> 1642201096 +1100 commit: myfile2
4fdfedfd9d406506be8b02f5b863dbc08d43cc9f 7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 CI <CI@example.com> 1642201096 +1100 commit: myfile3
7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 f708d3e3819470a69f6c8562ff1e68eef02f8cac CI <CI@example.com> 1642201096 +1100 commit: myfile4
f708d3e3819470a69f6c8562ff1e68eef02f8cac 5428838691c97ac192c8b8e1c3f573d8541a94b6 CI <CI@example.com> 1642201104 +1100 commit: test

View file

@ -0,0 +1,2 @@
x<01>ÍA
ƒ0@Ñ®sŠÙÊL:#)¸ò1™PÁ!")ØÛ×#tûyðS5[Ë¥íª€*©`”¹ë5df¥ 9<><39>T:žùž…KLïâ§½ëãÏqzém[õ–ª @ÂÞ#a/p%Btg='MÿäξeY•Ü.,,·

View file

@ -0,0 +1,2 @@
x<01>ЮA
Т0@Qз9Eі<45>Ь$<24>I"BW=F<><46>`СиR"шээм~от<D0BE>ЕЕЅ[LtъЛЊu<D08A>1<03><>ЬaШ>АFvфCЩ!ЁйђЎЏnЃHђ<48>fѕтЂдYcBa<42>QA\U)$q&Пћcнэ8йы8нѕ<D0BD>лідKYлЭ"<22>s<EFBFBD><73>и<EFBFBD>ЬQ<D0AC>ЉЎrгОuy*<2A>3н9<D0BD>

View file

@ -0,0 +1 @@
5428838691c97ac192c8b8e1c3f573d8541a94b6

View file

@ -0,0 +1 @@
test1

View file

@ -0,0 +1 @@
test2

View file

@ -0,0 +1 @@
test3

View file

@ -0,0 +1 @@
test4

View file

@ -0,0 +1 @@
myfile2 Branch: #master haha true master

View file

@ -0,0 +1 @@
{"KeyEvents":[{"Timestamp":623,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1369,"Mod":0,"Key":256,"Ch":78},{"Timestamp":1904,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2033,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2328,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2848,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3296,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3616,"Mod":0,"Key":127,"Ch":127},{"Timestamp":3824,"Mod":0,"Key":256,"Ch":104},{"Timestamp":3879,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3927,"Mod":0,"Key":256,"Ch":104},{"Timestamp":4000,"Mod":0,"Key":256,"Ch":97},{"Timestamp":4239,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4809,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5024,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5824,"Mod":0,"Key":260,"Ch":0},{"Timestamp":6079,"Mod":0,"Key":256,"Ch":32},{"Timestamp":6376,"Mod":0,"Key":256,"Ch":99},{"Timestamp":6591,"Mod":0,"Key":256,"Ch":116},{"Timestamp":6640,"Mod":0,"Key":256,"Ch":101},{"Timestamp":6816,"Mod":0,"Key":256,"Ch":115},{"Timestamp":6856,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7136,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7487,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":36}]}

View file

@ -0,0 +1,21 @@
#!/bin/sh
cd $1
git init
git config user.email "CI@example.com"
git config user.name "CI"
echo test1 > myfile1
git add .
git commit -am "myfile1"
echo test2 > myfile2
git add .
git commit -am "myfile2"
echo test3 > myfile3
git add .
git commit -am "myfile3"
echo test4 > myfile4
git add .
git commit -am "myfile4"

View file

@ -0,0 +1,4 @@
{
"description": "Invoke a custom command that creates a file, and then stage and commit that file. In this case we're using a more customised flow",
"speed": 5
}