Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

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

Open
musamarcusso opened this issue Jun 7, 2020 · 5 comments

Comments

@musamarcusso
Copy link
Member

musamarcusso commented Jun 7, 2020

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
Copy link
Member Author

musamarcusso commented Jun 7, 2020

Repositories to add this action:

  • uuv_simulator
  • rexrov2
  • desistek_saga
  • eca_a9
  • lauv_gazebo
  • uuv_plume_simulator
  • uuv_docker

@musamarcusso
Copy link
Member Author

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
Copy link

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

@pxalcantara
Copy link

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
Copy link
Member Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants