Skip to content

docs(api): pushrules remove saying None is returned when not found - #2369

Merged
nejch merged 1 commit into
mainfrom
jlvillal/push_rules
Nov 8, 2022
Merged

docs(api): pushrules remove saying None is returned when not found#2369
nejch merged 1 commit into
mainfrom
jlvillal/push_rules

Conversation

@JohnVillalovos

@JohnVillalovos JohnVillalovos commented Nov 8, 2022

Copy link
Copy Markdown
Member

In groups.pushrules.get(), GitLab does not return None when no rules are found. GitLab returns a 404.

Update docs to not say it will return None

Also update docs in project.pushrules.get() to be consistent. Not
100% sure if it returns None or returns a 404, but we don't need to
document that.

Closes: #2368

@JohnVillalovos
JohnVillalovos requested a review from nejch November 8, 2022 15:41

@nejch nejch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @JohnVillalovos, just a small question :)

Comment thread docs/gl_objects/groups.rst
In `groups.pushrules.get()`, GitLab does not return `None` when no
rules are found. GitLab returns a 404.

Update docs to not say it will return `None`

Also update docs in `project.pushrules.get()` to be consistent. Not
100% sure if it returns `None` or returns a 404, but we don't need to
document that.

Closes: #2368
@nejch
nejch enabled auto-merge (rebase) November 8, 2022 16:31
@nejch
nejch merged commit c3600b4 into main Nov 8, 2022
@nejch
nejch deleted the jlvillal/push_rules branch November 8, 2022 16:34
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.

group.pushrules.get() should return None not 404.

2 participants