Skip to content

Conversation

dacofr
Copy link
Collaborator

@dacofr dacofr commented Feb 20, 2025

Done

  • Init implementation of VersionController interface with dummy behaviour (TL;DR : return nil, errors.New("implement me"))
  • Integrate go-gerrit lib
  • Allow connection with Gerrit API (reuse username, base-url, token parameters)
  • Implement GetRepositories with search based on Regex (cf https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#list-projects)
  • Implement GetPullRequests and GetPullRequests
  • Implement MergePullRequest and ClosePullRequest
  • Minimal implementation for CreatePullRequest and UpdatePullRequest, just to be able to return an scm.PullRequest object

Will not be implemented

  • ForkRepository

Comment on lines 54 to 69
if project.State != "ACTIVE" {
log.Debug("Skipping repository since state is not ACTIVE")
continue
}
Copy link

@aladjadj aladjadj Feb 20, 2025

Choose a reason for hiding this comment

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

I think it's possible to filter directly in the ProjectOptions right ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't see any option to filter state directly with ProjectOptions : https://github.com/andygrunwald/go-gerrit/blob/master/projects.go#L185
Seems possible directly using Gerrit Rest API, but go-gerrit didn't implement it yet 😃

@dacofr dacofr force-pushed the implement-gerrit-scm branch from 5f571a6 to 229827a Compare April 22, 2025 06:41
@dacofr dacofr force-pushed the implement-gerrit-scm branch from 229827a to 2b07a2f Compare May 12, 2025 22:08
@dacofr dacofr force-pushed the implement-gerrit-scm branch from 7a50322 to e381bd0 Compare May 22, 2025 21:39
@dacofr dacofr force-pushed the implement-gerrit-scm branch from 12dec00 to 9ae9be6 Compare August 5, 2025 14:44
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.

2 participants