-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
action para criar branch ao fazer assign (#215)
Co-authored-by: Andre Almeida <[email protected]>
- Loading branch information
1 parent
7a1d976
commit 9d12b0b
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Create Branch on Assignment | ||
|
||
on: | ||
issues: | ||
types: | ||
- assigned | ||
|
||
jobs: | ||
create-branch: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config user.name "${{ github.actor }}" | ||
git config user.email "${{ github.actor }}@users.noreply.github.com" | ||
- name: Create Branch | ||
run: | | ||
ISSUE_NUMBER=$(echo ${{ github.event.issue.number }}) | ||
BRANCH_NAME="issue-${ISSUE_NUMBER}" | ||
git checkout -b $BRANCH_NAME | ||
git push origin $BRANCH_NAME | ||
- name: Notify Success | ||
run: echo "Branch created successfully!" |