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

Aligning Gitab and Github plugins with Bitbucket #106

Merged
merged 17 commits into from
Jan 10, 2025
Merged

Conversation

shikari-ac
Copy link
Contributor

@shikari-ac shikari-ac commented Dec 31, 2024

This pull request introduces several significant enhancements and fixes to the VCS plugin's integration with GitLab and GitHub APIs. These updates improve functionality, add support for new features, and resolve existing issues.

Common Functionality Across GitLab and GitHub

The following functionalities have been aligned and supported for both GitLab and GitHub plugins:

  • Listing organizations and repositories for GitHub and groups, subgroups, and projects for GitLab.
  • Retrieve Pull/Merge Request Information.
  • Add Role to a Pull/Merge Request: Supports adding users to a PR/MR as reviewers or assignees.
  • Set Status of a Pull/Merge Request.
  • Commenting on a particular PR/MR.
  • Fetches repository/project code and changes associated with a PR/MR.

GitLab Plugin Enhancements

  • Resolves projects across all sub-projects of a given group.
  • Lists groups available for the current user, supporting the entire VCS scope.
  • AddRoleToPR supports assignee and reviewer roles.
  • SetStatusOfPR supports approve and unapprove statuses.
  • File Upload and Markdown Commenting. Uploads files and constructs markdown comments with links to uploaded files.
  • Library Migration: Moved from xanzy/go-gitlab to gitlab.com/gitlab-org/api/client-go due to deprecation of the former library.

GitHub Plugin Enhancements

  • Lists all organizations accessible to the authenticated user if a user doesn't pass a namespace in args.
  • AddRoleToPR supports assignee and reviewer roles.
  • SetStatusOfPR supports approve and request_changes statuses. Approve status requires a comment, unlike other VCS providers.

Bitbucket Plugin Enhancements

Supported listing of users forks/repositories.

Custom HTTP Clients for VCS

VCS clients now support custom HTTP clients, which can be configured via the Scanio configuration file.
Custom headers are fully supported, providing enhanced flexibility.

VCS URL Parsing

  • Introduced specialized parsers for GitLab and GitHub URL formats.
  • Updated Bitbucket parsing to support listing user fork/repositories.

Go Version

Bump go version 1.19 -> 1.23

Fixes

Fixed incorrect argument validation for the list command, ensuring proper input handling.

@shikari-ac shikari-ac added the enhancement New feature or request label Dec 31, 2024
@shikari-ac shikari-ac requested a review from japroc December 31, 2024 10:13
@shikari-ac shikari-ac self-assigned this Dec 31, 2024
@shikari-ac
Copy link
Contributor Author

During development,I have faced with restrictions from the side of Github API - #107

Copy link
Contributor

@japroc japroc left a comment

Choose a reason for hiding this comment

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

LGTM

@shikari-ac shikari-ac merged commit 616d94b into main Jan 10, 2025
6 checks passed
@shikari-ac shikari-ac deleted the shikari/vcs-aligning branch January 10, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants