Skip to content

Commit a841fae

Browse files
committed
Bugfix (possible release 1.0.0 ?)
1 parent 142973a commit a841fae

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/script.sh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
#!/usr/bin/env bash
22

33
create_pull_request() {
4-
5-
echo "$1"
6-
echo "$2"
7-
exit 1
8-
9-
104
# Download word list
115
curl -sL https://raw.githubusercontent.com/TomBos/TLC/master/src/word_lists/word_list.txt -o word_list.txt
126

137
# Source wordlist (branch names)
148
mapfile -t words < word_list.txt
159

1610
for i in $(seq 0 "$2"); do
17-
git checkout -b "$word"
11+
WORD="${words[i]}"
12+
git checkout -b "$WORD"
1813

1914
# Swap modes based on user input
2015
if [[ "$1" == 1 ]]; then
@@ -25,10 +20,10 @@ create_pull_request() {
2520
fi
2621

2722
# Push Branch to remote and create PR
28-
git push --set-upstream origin "$word"
29-
gh pr create --base master --head "$word" --title "PR from $word to master" --body "Pull request from $word to master."
23+
git push --set-upstream origin "$WORD"
24+
gh pr create --base master --head "$WORD" --title "PR from $WORD to master" --body "Pull request from $WORD to master."
3025

31-
gh pr merge "$word" --merge --delete-branch
26+
gh pr merge "$WORD" --merge --delete-branch
3227
done
3328

3429

0 commit comments

Comments
 (0)