Skip to content

feat: plugin first implementation - #1

Merged
gusfcarvalho merged 3 commits into
mainfrom
gc-feat-plugin
Apr 1, 2026
Merged

feat: plugin first implementation#1
gusfcarvalho merged 3 commits into
mainfrom
gc-feat-plugin

Conversation

@gusfcarvalho

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces the first working implementation of a Compliance Framework GitLab Repositories plugin that authenticates to GitLab, enumerates projects in a group, collects repo/CI/MR governance data, and evaluates OPA policies per project.

Changes:

  • Implement core plugin lifecycle (Configure, Init, Eval) plus GitLab data collection (projects, approvals, pipelines, MRs, releases, CODEOWNERS, environments, push rules).
  • Add supporting data model types for policy input (SaturatedProject, OpenMergeRequest).
  • Add extensive unit tests and introduce Go module + Makefile build scaffolding.

Reviewed changes

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

Show a summary per file
File Description
main.go Core plugin implementation, config/auth handling, project enumeration, policy evaluation + evidence creation
types.go Policy input structs used to marshal GitLab data into OPA
merge_requests.go Fetch open MRs and enrich with per-MR approval state
org_teams.go Fetch group membership (inherited members) for policy reasoning
codeowners.go Fetch and decode CODEOWNERS content from standard locations
plugin_test.go Broad unit tests for GitLab client creation and data-gathering methods
config_test.go Unit tests for config validation and pipeline lookback parsing
Makefile Basic build/help targets (currently with OPA precheck and build invocation)
go.mod / go.sum Module definition and dependency lockfile updates

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

Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread main.go Outdated
Comment thread main.go
Comment thread main.go
Comment thread main.go Outdated
Comment thread main.go
Comment thread main.go Outdated
Comment thread codeowners.go
Comment thread merge_requests.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 10 changed files in this pull request and generated 3 comments.


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

Comment thread main.go
Comment thread Makefile Outdated
Comment thread main.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 10 changed files in this pull request and generated 2 comments.


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

Comment thread main.go
Comment thread Makefile
@gusfcarvalho
gusfcarvalho merged commit aa96979 into main Apr 1, 2026
6 checks passed
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