Problem/Motivation

As we are implementing the new contribution system, we are trying to retrieve information from the MRs related to an issue, whether this issue is from gitlab or from d.o. For gitlab issues, we can use the API provided for it, and for d.o we are leveraging the api-d7 endpoint.

The current implementation lacks the ability to bring MRs linked to the issue, and it shouldn't be too complex to add.

Steps to reproduce

Visit https://www.drupal.org/api-d7/node/3332546.json and see that there is no way to retrieve the MR for the issue.

Proposed resolution

When adding a get parameter to the request, like this: "?related_mrs=1", the related MRs are returned as part of the request.

Remaining tasks

Create MR.

User interface changes

None.

API changes

New parameter available when querying issues via the api-d7 endpoint.

Data model changes

None.

Issue fork drupalorg-3360762

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

drumm made their first commit to this issue’s fork.

  • drumm committed f0241724 on 7.x-3.x authored by fjgarlin
    Issue #3360762: Retrieve related MRs for the issue via the api-d7...
drumm’s picture

Status: Needs review » Fixed

Merged!

dpi’s picture

Curious why this wouldnt be provided in the response by default?

Isnt it a bit odd this feature is hidden behind a flag?

dpi’s picture

fjgarlin’s picture

Mostly for performance reasons. This feature is only used, as far as we know, by one of our subsystems, so we didn't want to add the extra performance hit of bringing that data if it isn't really needed.

drumm’s picture

And as we migrate Drupal.org past Drupal 7, and issues to GitLab, this API will become unavailable in the future, potentially abruptly. No new features are being added, except for when needed to help migration, which is this issue does. People using this API should not depend on it for anything critical.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.