Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.

Commit de8609a

Browse files
committed
New function: Prompt_YesNo_ci()
1 parent be1d9eb commit de8609a

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

bashlava.sh

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,7 @@ function pr {
9090

9191
gh pr create --fill --title "${_pr_title}" --base "${default_branch}"
9292
gh pr view --web
93-
94-
### PROMPT
95-
echo && my_message="Want to see 'CI' status? (y/n)" && App_Blue
96-
read user_input;
97-
case ${user_input} in
98-
y | Y) ci;;
99-
*) my_message="OK, lets not show CI status." && App_Green;;
100-
esac
93+
Prompt_YesNo_ci
10194

10295
# UX fun
10396
echo && my_message="NEXT MOVE suggestion: 'ci' - 'mrg' " App_Green
@@ -112,19 +105,8 @@ function mrg {
112105
_doc_name="mrg_info.md" App_Show_Docs
113106

114107
gh pr merge
115-
116-
### PROMPT
117-
echo
118-
my_message="Do you want to see CI status? (y/n)" && App_Blue
119-
read user_input;
120-
case ${user_input} in
121-
y | Y) ci;;
122-
*) my_message="OK, lets not show CI status." && App_Green;;
123-
esac
124-
108+
Prompt_YesNo_ci
125109
App_Show_Version
126-
127-
# UX fun
128110
echo && my_message="NEXT MOVE suggestion: 'ci' - 'sv' - 'v' - 't' " App_Green
129111
}
130112

@@ -325,6 +307,16 @@ function status {
325307
#
326308
#
327309

310+
function Prompt_YesNo_ci {
311+
# called by fct like: pr, mrg
312+
echo && my_message="Want to see 'ci' status? (y/n)" && App_Blue
313+
read user_input;
314+
case ${user_input} in
315+
y | Y) ci;;
316+
*) my_message="Abord 'ci' status" && App_Green;;
317+
esac
318+
}
319+
328320
function App_short_url {
329321

330322
### CMD EXECUTION

0 commit comments

Comments
 (0)