Giter Club home page Giter Club logo

Comments (4)

prarit avatar prarit commented on June 10, 2024

Sorry for the very late reply. I am going through some old issues and seeing what can be done to resolve them.

@zampierilucas , I don't see anything obvious with the Merge Request or Issue APIs that allows this sort of linking, even though there are references to being able to do so. Any idea on where I might find the API magic?

from lab.

zampierilucas avatar zampierilucas commented on June 10, 2024

@prarit The feature @dooraim is looking for is creating_merge_requests.html#from-an-issue, and from those docs "selecting Create merge request redirects to the merge request creation form instead of immediately creating the merge request.", so there's no API to directly do that.

But what GitLab does in the backend is quite simple, it does two things:

  • Adds "Closes $ISSUE_ID" to the mr description, that's creates a reference between the mr to an issue, so when the mr is merged, the issue is also resolved.
  • Created a branch and pushed it based on the issue title, example this issue is named "Consider building this in COPR":
    image

So the resulting mr is an empty(no commits) mr like:
image

This can probably be scripted using pipes in lab, but we can also implement it, wdyt?

from lab.

prarit avatar prarit commented on June 10, 2024

Interesting thought. But I wonder if it is easier just to append the Description with a 'Closes' line?

from lab.

zampierilucas avatar zampierilucas commented on June 10, 2024

Sure, GitLab will see as the same as using the button on the issue, we would only be missing the convenience of having a branch name and description based on the issue data, unless manually created.

from lab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.