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

Gitlab #590

Open
Padarn opened this issue Feb 3, 2025 · 0 comments
Open

Gitlab #590

Padarn opened this issue Feb 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Padarn
Copy link

Padarn commented Feb 3, 2025

Describe the bug
It seems the gitlab plugin expects a field called fork in the response from the gitlab projects API

export const GitLabRepositorySchema = z.object({
  id: z.number(),
  name: z.string(),
  path_with_namespace: z.string(), // Changed from full_name to match GitLab API
  visibility: z.string(), // Changed from private to match GitLab API
  owner: GitLabOwnerSchema,
  web_url: z.string(), // Changed from html_url to match GitLab API
  description: z.string().nullable(),
  fork: z.boolean(),
  ssh_url_to_repo: z.string(), // Changed from ssh_url to match GitLab API
  http_url_to_repo: z.string(), // Changed from clone_url to match GitLab API
  created_at: z.string(),
  last_activity_at: z.string(), // Changed from updated_at to match GitLab API
  default_branch: z.string()
});

This causes issues because the gitlab api does not have this field: https://docs.gitlab.com/ee/api/projects.html

If the project is a fork, the forked_from_project field appears in the response. For this field, if the upstream project is private, a valid token for authentication must be provided. The field mr_default_target_self appears as well. If this value is false, then all merge requests target the upstream project by default.

I was hoping to understand if this is a bug, or intentional?

@Padarn Padarn added the bug Something isn't working label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant