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

Add missing Project, CreateProjectOptions and EditProjectOptions fields #1342

Merged
merged 2 commits into from Jan 24, 2022

Conversation

turnabout
Copy link

Hello!

I found some missing fields on the main project-related structs (Project, CreateProjectOptions, EditProjectOptions). I took the liberty to add them where they're needed (in accordance with the GitLab API documentation https://docs.gitlab.com/ee/api/projects.html).

Here is a list of every missing field I found, as well as the structs I found were requiring them.

FIELD TYPE STRUCTS DESCRIPTION
analytics_access_level string Project, CreateProjectOptions, EditProjectOptions One of disabled, private or enabled
keep_latest_artifact boolean Project, EditProjectOptions Disable or enable the ability to keep the latest artifact for this project.
merge_pipelines_enabled boolean Project, CreateProjectOptions, EditProjectOptions Enable or disable merge pipelines.
merge_trains_enabled boolean Project, CreateProjectOptions, EditProjectOptions Enable or disable merge trains.
restrict_user_defined_variables boolean Project, EditProjectOptions Allow only users with the Maintainer role to pass user-defined variables when triggering a pipeline. For example when the pipeline is triggered in the UI, with the API, or by a trigger token.
merge_commit_template string Project, CreateProjectOptions, EditProjectOptions Template used to create merge commit message in merge requests. (Introduced in GitLab 14.5.)
squash_commit_template string Project, CreateProjectOptions, EditProjectOptions Template used to create squash commit message in merge requests. (Introduced in GitLab 14.6.)

Additionally, the struct tags for the ShowDefaultAwardEmojis field on CreateProjectOptions and EditProjectOptions were misspelled, so I fixed those.

Adds the following fields:
- AnalyticsAccessLevel (Project, CreateProjectOptions, EditProjectOptions)
- KeepLatestArtifact (Project, EditProjectOptions)
- MergePipelinesEnabled (Project, CreateProjectOptions, EditProjectOptions)
- MergeTrainsEnabled (Project, CreateProjectOptions, EditProjectOptions)
- RestrictUserDefinedVariables (Project, EditProjectOptions)
- MergeCommitTemplate (Project, CreateProjectOptions, EditProjectOptions)
- SquashCommitTemplate (Project, CreateProjectOptions, EditProjectOptions)
Copy link
Member

@svanharmelen svanharmelen left a comment

Choose a reason for hiding this comment

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

Thanks @turnabout! LGTM 👍🏻

@svanharmelen svanharmelen merged commit 35322d7 into xanzy:master Jan 24, 2022
@turnabout turnabout deleted the fix/add-missing-project-fields branch January 24, 2022 20:46
@neiser
Copy link
Contributor

neiser commented Feb 1, 2022

@svanharmelen As it's merged, would you mind releasing it as well? I'd appreciate it :)

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.

None yet

4 participants