Repository navigation
Use merge_requests API for created MRs in GitLab plugin - #480
Merged
Merged
Conversation
psss
force-pushed
the
gitlab-mr-created
branch
from
October 12, 2026 18:50
d9da6b3 to
4aa1f72
Compare
psss
approved these changes
Oct 12, 2026
psss
left a comment
Owner
There was a problem hiding this comment.
Thanks for the fix! Looks good, only the --full-message use case seems to be broken:
File "/home/psplicha/git/did/did/plugins/gitlab.py", line 361, in body
self.data['project_id'], self.data['target_id'])
~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'target_id'Here's a simple fix and test suggested by Claude: 4aa1f72, looks good?
merge_requests API for created MRs in GitLab plugin
The events API does not reliably return all merge requests. Switch to the global merge_requests endpoint filtered by author_username and date range for complete results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MergedRequest wraps data from the global merge_requests API, which has no 'target_id' key. In full_message mode the inherited Issue.body looked up 'target_id', raising KeyError. Populate the body directly from the inline 'description' field instead, avoiding both the crash and an unnecessary API call. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
psss
force-pushed
the
gitlab-mr-created
branch
from
October 13, 2026 07:31
4aa1f72 to
d869dc4
Compare
Collaborator
Author
|
@psss thanks for the full-message fixup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The events API does not reliably return all merge requests. Switch to the global merge_requests endpoint filtered by author_username and date range for complete results.