•  
     
    story #21336 create a development branch on GitLab out of an artifact
Summary
developer working on gitlab
create a development branch on GitLab out of an artifact

I reduce the risk of having development items not connected to specifications

When the project have the following pre-conditons:

  • At least one GitLab connected git repository
  • And this repository has a token (early version of Tuleap <-> GitLab integrations didn't kept the token)
  • And the user is member of project_members group and have access to the artifact
    • this permission is adhoc and avoid the introduction of yet another permission on an already hard to understand model. There should be a compelling reason to add a new permission and it can be added later on.

Then, In "Action" menu of an artifact contains an entry "Create development branch on GitLab".

When this action is clicked

  • If there is only one GitLab repository in the project, the creation of the branch is performed right away
    • A popup is prompted to the requester with a string field to choose the git reference from where the branch should be created
      • By default, it's the repository default branch that is pre-filled (eg main, develop, ...)
      • The requester can change the reference (a git commit, a tag name, a branch name)
      • If the reference is invalid, an error should be raised at submission and the popup is not closed.
  • If there is more than one GitLab repository in the project that matches the criteria defined earlier, a popup is displayed to the requester to ask them to select the repository.
    • Then the popup allows to select the reference before creation (same workflow than if there is only one GitLab repo in the project)
    • As soon as the requester change the selected repository, regardless of reference modification they have made, the reference is reset to default.

When the repository is known, the branch is created on GitLab with the following pattern:

  • prefix``tuleap-XXXX-slugify(artifact title)
    • prefix can be set in the configuration of the GitLab integration (at repository level). Common forms would be dev- or dev/
    • tuleap-XXXX is the patterns that allows Tuleap to know about the branch (see story #17182)
    • if the title semantic is defined for the tracker, the slugified version of the summary is the suffix

Mockup here: https://www.figma.com/proto/LMA5XhZGLwTqUfwGem23nn/Create-GitLab-branch-from-artifact-view?page-id=0%3A1&node-id=1%3A1128&viewport=297%2C538%2C0.5&scaling=scale-down-width

Empty
Empty
Status
Empty
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#21336
Manuel Vacelet (vaceletm)
2021-06-23 18:11
2021-05-07 14:42
3791

References
Referencing story #21336

Git commit

tuleap/tuleap/stable

[feature] Display action button if preconditions are met 117ff0d103
vue: 2.6.13 -> 2.6.14 6a55c6dfd4
[feature] Display empty modal at action click 5f23105c8d
[feature] Add loading spinner in create branch modal 0cfd1bbeab
'Create GitLab branch' modal is always in English 37e3eef013
Run Stylelint on Vue files and make it play nice with Prettier f1030823dc
[feature] Display list of integration in modal e39cd5d05d
[feature] Add REST POST gitlab_branch/ 594387f9ed
[feature] Display project integrations list in a select 99ae1716d6
[feature] Display the full form in the modal 3869de3644
[feature] Create the branch with the modal 8f1857654a
Handle feedbacks on GitLab branch creation 85987e43b0
Remove Vuex usage in the 'Create branch on a GitLab repository' modal d5bf11b3bb
Enforce branch name when creating a branch on GitLab from an artifact f559168ed7
[feature] Handle create branch prefix through REST 2f5a5e80a1
Add a loading state when opening the GitLab create branch modal 6801446170
[feature] Better handling of create branch prefix checks 3c2f454bfa
[feature] Use prefix in creation branch name 2e2ac3d7f4
The possibility of creating a branch in a GitLab repo from an artifact is GA e40128a871
[feature] Edit create branch prefix in the UI 810f97f648
Information about branches of the integrated GitLab repositories can be requested f62304dbc6
Extract concurrency limit pool from TestPlan 9258dc2d2a
Prefill default branch of the GitLab repository in the "create branch" modal f87101978a
Use _ instead of - in the name of the branches created on GitLab d2e426e7ea
Add link to the branch created on the GitLab repository 011c1dceff
Apply latest SCSS coding standards 87ce427cf8
vue: 2.6.13 -> 2.6.14 5b7060a124
Apply latest SCSS coding standards 2c6911c18f
Apply latest SCSS coding standards 59784dcccb

Follow-ups

User avatar
Thomas Gerbet (tgerbet)2021-06-23 11:41
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Is related to
    • Added is Covered by:
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Status changed from On going to Done
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar

Update ACs to take into account the reference creation


  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes