From d4e9cf6829f727411202c62a882ac66269a03dfa Mon Sep 17 00:00:00 2001 From: Rezaul Karim Shaon Date: Tue, 3 Dec 2024 20:43:22 +0600 Subject: [PATCH] branch name generate automation --- .github/workflows/branch.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/branch.yml diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml new file mode 100644 index 0000000..34f95f9 --- /dev/null +++ b/.github/workflows/branch.yml @@ -0,0 +1,19 @@ +name: Custom Branch Naming + +on: + issues: + types: [opened] + +jobs: + create-branch: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Generate branch name + run: | + ISSUE_NUMBER=${{ github.event.issue.number }} + ISSUE_TITLE=${{ github.event.issue.title }} + BRANCH_NAME="feature/${ISSUE_NUMBER}-$(echo ${ISSUE_TITLE} | tr '[:upper:]' '[:lower:]' | tr ' ' '-')" + echo "Branch Name: ${BRANCH_NAME}"