Skip to content

Conversation

@arnavk23
Copy link
Contributor

@arnavk23 arnavk23 commented Dec 2, 2025

Fixes #202

@arnavk23
Copy link
Contributor Author

arnavk23 commented Dec 2, 2025

@IanButterworth please review this pr. Thanks!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds GitLab support to TagBot, enabling the tool to work with repositories hosted on GitLab in addition to GitHub. The implementation creates a wrapper layer (ProjectWrapper) that adapts the python-gitlab API to match the PyGithub interface used throughout the codebase, allowing minimal changes to existing code.

Key Changes:

  • New GitLab adapter module providing PyGithub-compatible interface for GitLab operations
  • Auto-detection of GitLab instances based on URL patterns to switch between GitHub and GitLab clients
  • Optional dependency handling for both python-gitlab and boto3 to support environments where these aren't needed

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tagbot/action/gitlab.py New adapter module implementing PyGithub-compatible wrapper around python-gitlab
tagbot/action/repo.py Updated to detect GitLab URLs and instantiate appropriate client; added type casts for stricter type checking
tagbot/web/__init__.py Made boto3 import optional with dummy fallback for environments without AWS Lambda
test/action/test_gitlab_wrapper.py Basic tests for GitLab wrapper covering core functionality
test/action/test_gitlab_wrapper_extended.py Additional tests for releases, issues, and commit handling
pyproject.toml Added python-gitlab dependency
poetry.lock Updated lock file with python-gitlab and requests-toolbelt dependencies
.github/workflows/test.yml Added explicit python-gitlab installation step in CI
README.md Documentation for GitLab support configuration
.gitignore Added .venv/ to ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@IanButterworth
Copy link
Member

Copilot suggestions seem valid?

@arnavk23
Copy link
Contributor Author

arnavk23 commented Dec 2, 2025

Copilot suggestions seem valid?

Tried didn't work. Will remove the commit to go back to the working version.

@IanButterworth
Copy link
Member

I think the reviews should be addressed more granularly than all or nothing

@arnavk23
Copy link
Contributor Author

arnavk23 commented Dec 2, 2025

I think the reviews should be addressed more granularly than all or nothing

Thank you for the suggestion. Added them!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 8 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@IanButterworth
Copy link
Member

I'm not that familiar with python so I'm deferring to copilot for a first pass. Once copilot is happy or we dismiss the suggestions with motivation I can do a more manual review. Hope you don't mind this approach..

@arnavk23
Copy link
Contributor Author

arnavk23 commented Dec 2, 2025

I'm not that familiar with python so I'm deferring to copilot for a first pass. Once copilot is happy or we dismiss the suggestions with motivation I can do a more manual review. Hope you don't mind this approach..

No issues. I will work on the copilot suggestions soon.

Copilot finished reviewing on behalf of arnavk23 December 3, 2025 05:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 9 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

GitLab support

2 participants