When #3071752: Enable ability to open merge requests for branches in issue forks is done, activity on the merge requests should be discoverable. See also #3071681: Decide what information about issue forks to show on issue page on Drupal.org, implement.

An automated comment on the Drupal.org issue, setting the issue to needs review, to alert the maintainer about activity would be good. Ongoing comments for merge request activity would also be good, but overkill if it were alerting for comments on individual lines of code.

We can also pull in information client-side or server-side from GitLab’s API as the issue is viewed. We need to explore the options for GitLab to push notifications of merge request activity to www.drupal.org, or poll for updates.

Issue fork drupalorg-3071755

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

drumm created an issue. See original summary.

drumm’s picture

Assigned: Unassigned » drumm
Status: Postponed » Active
drumm’s picture

Pre-merge request opening, comments can be made on commits. These are at pages like https://git.drupalcode.org/issue/drupalorg-3071681/activity, the Comments tab.

That GitLab page which does make XHR requests to get that HTML in JSON. It is not part of the API, and I assume could change in any GitLab release. That looks like the only way to efficiently list all comments in an issue fork.

The REST API does have these comments available, https://docs.gitlab.com/ee/api/discussions.html#list-project-commit-disc..., but only for individual commit hashes.

The GraphQL API does not have these that I can find.

drumm’s picture

Post-merge request opening, comments on the merge request and commits in it, including comments made before merge request opening, look like they are easily available via Rest https://docs.gitlab.com/ee/api/discussions.html#list-project-merge-reque... and GraphQL https://docs.gitlab.com/ee/api/graphql/reference/#mergerequest

drumm’s picture

options for GitLab to push notifications of merge request activity to www.drupal.org

There is a webhook for that: https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#merge...

drumm credited Mixologic.

drumm’s picture

For comments we pull in, we should show the full text of the comment. There is an API to render Markdown, if we need it, https://docs.gitlab.com/ee/api/markdown.html. Complex GitLab-flavored Markdown, like suggested code changes, will be interesting.

Mixologic’s picture

For *pre* merge request comments, I still feel like those should be Work in Progress, and not necessarily a place to collaborate. Unless we *do* want more pre-test collaboration to take place.

I guess the alternate argument is we dont want people to accidentally shout into a well without anybody else seeing it...

drumm’s picture

Shouting into a well was my concern, commenting on an in-progress branch’s commit is useful collaboration. I don’t think we’ve actually opened an issue to allow GitLab to send notification emails yet, so here it is #3154890: Allow GitLab to send email notifications.

  • drumm committed 8241861 on 7.x-3.x
    Issue #3071755: Add {drupalorg_issue_fork_branches}.merge_request_iid...

  • drumm committed 35b7b32 on 7.x-3.x
    Issue #3071755: Add webhook endpoint to keep track of merge requests
    

  • drumm committed 8900051 on 7.x-3.x
    Issue #3071755: Comment on the issue when a merge request is opened,...
  • drumm committed 9afe30d on 7.x-3.x
    Issue #3071755: Only process merge_request payloads, queue for further...

  • drumm committed 28bbf58 on 7.x-3.x
    Issue #3071755: Do not need to abbreviate merge request here
    

  • drumm committed 08ffd55 on 7.x-3.x
    Issue #3071755: Insert the notes in order
    
  • drumm committed 0ca8568 on 7.x-3.x
    Issue #3071755: Add merge request status & resolved status to notes
    
  • drumm committed 2867977 on 7.x-3.x
    Issue #3071755: Add merge request status to its link
    
  • drumm committed 2b291cf on 7.x-3.x
    Issue #3071755: Move merge request above last commit message
    
  • drumm committed 2ccd6d3 on 7.x-3.x
    Issue #3071755: Start collecting merge request status
    
  • drumm committed 385f8c0 on 7.x-3.x
    Issue #3071755: Skip redundant notes
    
  • drumm committed 4653733 on 7.x-3.x
    Issue #3071755: Pre-connect to GitLab
    
  • drumm committed 6a6b09f on 7.x-3.x
    Issue #3071755: Do not double attach behavior
    
  • drumm committed 89f0ec7 on 7.x-3.x
    Issue #3071755: Add authorship information and some formatting
    
  • drumm committed 9295d3c on 7.x-3.x
    Issue #3071755: Consistently post comments when more than one automated...
  • drumm committed b529b58 on 7.x-3.x
    Issue #3071755: Load some images from GitLab discussions
    
  • drumm committed b7f682f on 7.x-3.x
    Issue #3071755: Do not need to abbreviate merge request here
    
  • drumm committed f4920f8 on 7.x-3.x
    Issue #3071755: Initial pass at showing merge request activity on www....
drumm’s picture

Status: Active » Fixed

This is to the point where the basics are done, and the rest of the work would benefit from separate followups. Two I already have are:

Status: Fixed » Closed (fixed)

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