-
Notifications
You must be signed in to change notification settings - Fork 25
Gitlab support #422
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 support #422
Conversation
|
@IanButterworth please review this pr. Thanks! |
There was a problem hiding this 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-gitlabandboto3to 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.
|
Copilot suggestions seem valid? |
Co-authored-by: Copilot <[email protected]>
Tried didn't work. Will remove the commit to go back to the working version. |
|
I think the reviews should be addressed more granularly than all or nothing |
Thank you for the suggestion. Added them! |
There was a problem hiding this 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.
|
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. |
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this 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.
Co-authored-by: Copilot <[email protected]>
Fixes #202