uuvsimulator / maintainers

Apache License 2.0
0 stars 0 forks source link

Add Git Action to all repositories to create a branch from an issue once it has been assigned #14

Open musamarcusso opened 4 years ago

musamarcusso commented 4 years ago

This Git Action from the Marketplace makes it a little easier to set a standard on the naming convention for the branches in which it will create a branch with the issue name as soon as the issue gets assigned to a person. https://github.com/marketplace/actions/create-issue-branch

Adding this to all the repositories will help on getting the branch naming problem solved. Having an issue linked to the branch name also helps in the discussion process.

musamarcusso commented 4 years ago

Repositories to add this action:

musamarcusso commented 4 years ago

The main things to be done in each repository is to create a .github folder. In it there needs to be a issue_branch.yml file that will configure the prefix of the branch name according to the label of the issue.

My proposal is to set it as

branches:
  - label: enhancement
    prefix: feature/
  - label: bug
    prefix: bugfix/
  - label: documentation
    prefix: docs/
  - label: maintenance
    prefix: maint/

The next set is to create the folder .github/workflows in which the create_issue_branch.yml file will configure this Git Action

on:
  issues:
    types: [assigned]

jobs:
  create_issue_branch_job:
    runs-on: ubuntu-latest
    steps:
    - name: Create Issue Branch
      uses: robvanderleek/create-issue-branch@master
pxalcantara commented 4 years ago

Great, I liked this approach to explain the task in this issues as a card! Nice

pxalcantara commented 4 years ago

The main things to be done in each repository is to create a .github folder. In it there needs to be a issue_branch.yml file that will configure the prefix of the branch name according to the label of the issue.

My proposal is to set it as

branches:
  - label: enhancement
    prefix: feature/
  - label: bug
    prefix: bugfix/
  - label: documentation
    prefix: docs/
  - label: maintenance
    prefix: maint/

The next set is to create the folder .github/workflows in which the create_issue_branch.yml file will configure this Git Action

on:
  issues:
    types: [assigned]

jobs:
  create_issue_branch_job:
    runs-on: ubuntu-latest
    steps:
    - name: Create Issue Branch
      uses: robvanderleek/create-issue-branch@master

There is also the need to install the App in the project repository, right?

musamarcusso commented 4 years ago

@pxalcantara yes, that for the uuv_simulator is the PR https://github.com/uuvsimulator/uuv_simulator/pull/400 As soon as a issue is then assigned to someone, the branch will be created and called <prefix>/issue-<issue_number>-<issue_name>