Skip to content

Commit e6d0e58

Browse files
Merge pull request #358 from alma/feature/ecom-2687-create-pull-requests-with-a-task
create pull requests with a task
2 parents 5f127b8 + 42df7c2 commit e6d0e58

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Taskfile.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ tasks:
108108
Please check out: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-personal-access-token-classic
109109
Then, run `gh auth login` or set the GITHUB_TOKEN environment variable with your personal access token.
110110
111+
pull-request:
112+
aliases:
113+
- pr
114+
deps:
115+
- gh-cli
116+
cmds:
117+
- ./bin/create-pull-request.sh
118+
111119
release:
112120
deps:
113121
- gh-cli

bin/create-pull-request.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
branch_name=$(git branch --show-current)
4+
extracted_part=$(echo "$branch_name" | cut -d '-' -f 3-)
5+
extracted_part_without_dashes=$(echo "$extracted_part" | tr '-' ' ')
6+
7+
gh pr create --base develop --head "$branch_name" --title "$extracted_part_without_dashes" --body "$extracted_part_without_dashes"

0 commit comments

Comments
 (0)