1. 07 9月, 2019 1 次提交
  2. 04 9月, 2019 1 次提交
    • C
      Support adding and removing labels w/ push opts · f00db0c3
      Christian Couder 提交于
      MergeRequests::PushOptionsHandlerService has been updated to allow
      adding and removing labels to a merge request using git push options.
      
      To create a new merge request and add 2 labels to it:
      
            git push -u origin -o merge_request.create \
              -o merge_request.label="My label 1" \
              -o merge_request.label="My label 2"
      
      To update an existing merge request and remove a label while
      adding a different label:
      
            git push -u origin -o merge_request.label="My added label" \
              -o merge_request.unlabel="My removed label"
      
      Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/64320
      f00db0c3
  3. 24 7月, 2019 1 次提交
    • C
      Support title and desc on merge w/ push option · 7cf4bf84
      Christian Couder 提交于
      MergeRequests::PushOptionsHandlerService has been updated to allow
      creating and updating merge requests with the `title` and
      `description` set using git push options.
      
      To create a new merge request and set its title and description:
      
            git push -u origin -o merge_request.create \
              -o merge_request.title="My title" \
              -o merge_request.description="My description"
      
      To update an existing merge request and set its title and
      description:
      
            git push -u origin -o merge_request.title="My title" \
              -o merge_request.description="My description"
      
      Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/64320
      7cf4bf84
  4. 17 7月, 2019 1 次提交
    • C
      Support rm src branch on merge w/ push option · 8256d407
      Christian Couder 提交于
      MergeRequests::PushOptionsHandlerService has been updated to allow
      creating and updating merge requests with the
      `remove_source_branch` set using git push options.
      
      To create a new merge request and set it to remove the source branch
      when it is merged:
      
        git push -u origin -o merge_request.create \
          -o merge_request.remove_source_branch
      
      To update an existing merge request and set it to remove the source
      branch when it is merged:
      
        git push -u origin -o merge_request.remove_source_branch
      
      Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/64320
      8256d407
  5. 05 5月, 2019 1 次提交
  6. 09 4月, 2019 3 次提交
    • L
      Support merge on pipeline success w/ push options · 68f189ad
      Luke Duncalfe 提交于
      MergeRequests::PushOptionsHandlerService has been updated to allow
      creating and updating merge requests with the
      `merge_when_pipeline_succeeds` set using git push options.
      
      To create a new merge request and set it to merge when the pipeline
      succeeds:
      
        git push -u origin -o merge_request.create \
          -o merge_request.merge_when_pipeline_succeeds
      
      To update an existing merge request and set it to merge when the
      pipeline succeeds:
      
        git push -u origin -o merge_request.merge_when_pipeline_succeeds
      
      Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/53198
      68f189ad
    • L
      Use Gitlab::PushOptions for `ci.skip` push option · 1883e320
      Luke Duncalfe 提交于
      Previously the raw push option Array was sent to Pipeline::Chain::Skip.
      
      This commit updates this class (and the chain of classes that pass the
      push option parameters from the API internal `post_receive` endpoint to
      that class) to treat push options as a Hash of options parsed by
      GitLab::PushOptions.
      
      The GitLab::PushOptions class takes options like this:
      
          -o ci.skip -o merge_request.create -o merge_request.target=branch
      
      and turns them into a Hash like this:
      
          {
            ci: {
              skip: true
            },
            merge_request: {
              create: true,
              target: 'branch'
            }
          }
      
      This now how Pipeline::Chain::Skip is determining if the `ci.skip` push
      option was used.
      1883e320
    • L
      Support merge request create with push options · aa352a95
      Luke Duncalfe 提交于
      To create a new merge request:
      
        git push -u origin -o merge_request.create
      
      To create a new merge request setting target branch:
      
        git push -u origin -o merge_request.create \
          -o merge_request.target=123
      
      To update an existing merge request with a new target branch:
      
        git push -u origin -o merge_request.target=123
      
      A new Gitlab::PushOptions class handles parsing and validating the push
      options array. This can be the start of the standard of GitLab accepting
      push options that follow namespacing rules. Rules are discussed in issue
      https://gitlab.com/gitlab-org/gitlab-ce/issues/43263.
      
      E.g. these push options:
      
        -o merge_request.create -o merge_request.target=123
      
      Become parsed as:
      
        {
          merge_request: {
            create: true,
            target: '123',
          }
        }
      
      And are fetched with the class via:
      
        push_options.get(:merge_request)
        push_options.get(:merge_request, :create)
        push_options.get(:merge_request, :target)
      
      A new MergeRequests::PushOptionsHandlerService takes the `merge_request`
      namespaced push options and handles creating and updating
      merge requests.
      
      Any errors encountered are passed to the existing `output` Hash in
      Api::Internal's `post_receive` endpoint, and passed to gitlab-shell
      where they're output to the user.
      
      Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/43263
      aa352a95