Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitlab: Add support for pull requests #4641

Merged
merged 6 commits into from
Oct 7, 2024
Merged

gitlab: Add support for pull requests #4641

merged 6 commits into from
Oct 7, 2024

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Oct 4, 2024

Summary

"pull requests" are minder's name for merge request, this adds support
for these in the gitlab provider.

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@coveralls
Copy link

coveralls commented Oct 4, 2024

Coverage Status

coverage: 52.95% (-0.4%) from 53.356%
when pulling fa9c75e on gitlab-pr
into 65b5ddf on main.

@JAORMX
Copy link
Contributor Author

JAORMX commented Oct 7, 2024

@jhrozek I ended up changing this so we use the unique gitlab PR ID as the upstream ID, and I added a new property to carry the user-friendly, smaller numbered, ID. The later we actually surface to users. This way, we can do more efficient lookups via the unique ID and there will be less probabilities of needing to fallback to the name.

@JAORMX JAORMX force-pushed the gitlab-pr branch 3 times, most recently from fd9ecf9 to 3c3f8e1 Compare October 7, 2024 07:47
@JAORMX JAORMX marked this pull request as ready for review October 7, 2024 07:47
@JAORMX JAORMX force-pushed the gitlab-pr branch 2 times, most recently from b0de583 to fb3e5cf Compare October 7, 2024 09:45
blkt
blkt previously approved these changes Oct 7, 2024
Copy link
Contributor

@blkt blkt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of minor comments, LGTM otherwise.

internal/providers/gitlab/manager/webhook_handlers.go Outdated Show resolved Hide resolved
internal/providers/gitlab/manager/webhook_handlers.go Outdated Show resolved Hide resolved
internal/providers/gitlab/manager/webhook_handlers.go Outdated Show resolved Hide resolved
internal/providers/gitlab/pull_request_properties.go Outdated Show resolved Hide resolved
"pull requests" are minder's name for merge request, this adds support
for these in the gitlab provider.

Signed-off-by: Juan Antonio Osorio <[email protected]>
This enables us to more uniquely identify the PR, while being able to
still use the friendly short number. This requires us to carry two IDs
in the PR properties.

Signed-off-by: Juan Antonio Osorio <[email protected]>
Signed-off-by: Juan Antonio Osorio <[email protected]>
Signed-off-by: Juan Antonio Osorio <[email protected]>
Signed-off-by: Juan Antonio Osorio <[email protected]>
@JAORMX JAORMX merged commit 233640c into main Oct 7, 2024
21 checks passed
@JAORMX JAORMX deleted the gitlab-pr branch October 7, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants