Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add code owner approval as attribute#1437

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@daniellanner
Copy link
Contributor

@daniellannerdaniellanner commentedApr 30, 2021
edited
Loading

AddProjectProtectedBranchManager.code_owner_approval_required to mimickGitLab API documentation:

AttributeTypeRequiredDescription
code_owner_approval_requiredbooleannoPrevent pushes to this branch if it matches an item in the CODEOWNERS file. (defaults: false)

Fixes#1436

The python API was missing the field code_owner_approval_requiredas implemented in the GitLab REST API.
@JohnVillalovos
Copy link
Member

A test for this would be awesome. Maybe in the functional tests. For an example see:https://github.com/python-gitlab/python-gitlab/blob/master/tools/functional/api/test_projects.py#L190

@codecov-commenter
Copy link

Codecov Report

Merging#1437 (fdc46ba) intomaster (09ef8d4) willnot change coverage.
The diff coverage isn/a.

Impacted file tree graph

@@           Coverage Diff           @@##           master    #1437   +/-   ##=======================================  Coverage   80.24%   80.24%           =======================================  Files          73       73             Lines        4064     4064           =======================================  Hits         3261     3261             Misses        803      803
FlagCoverage Δ
unit80.24% <ø> (ø)

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
gitlab/v4/objects/branches.py73.52% <ø> (ø)

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update09ef8d4...fdc46ba. Read thecomment docs.

@nejch
Copy link
Member

nejch commentedMay 1, 2021
edited
Loading

A test for this would be awesome. Maybe in the functional tests. For an example see:https://github.com/python-gitlab/python-gitlab/blob/master/tools/functional/api/test_projects.py#L190

@JohnVillalovos in this case I think we won't be able to test it in functional tests, as it's a premium feature and our CE docker container won't return the attribute.

Edit: I'll merge this for now John, as writing tests for all attributes would get tedious unless we need to test something specific around their behavior (like our list issue), but we should definitely think about how to maintain these hardcoded attributes better.

Since GitLab doesn't have an OpenAPI spec, maybe by periodically scanning the markdown tables from their docs for required/optional args for all endpoints and checking against our tuples, lol

@nejchnejch merged commitd61e669 intopython-gitlab:masterMay 1, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nejchnejchnejch approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Missing API code owner approval for protected branches

4 participants

@daniellanner@JohnVillalovos@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp