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

Convert response list to single data source for iid requests#169

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

hakkeroid
Copy link
Contributor

Solves#160

It is questionable though if the iid check should be located here as iids are specific and not available with all gitlab resources.

@gpocentek
Copy link
Contributor

Moving the checks elsewhere will lead to extra complexity. Still I'm not entirely convinced that this is the place for this test, but can't seem to find a better place to handle it.

Could you rebase your patch and I think I'll merge it as is since it clearly fixes the bugs and add support for a nice feature. Thank you.

@hakkeroidhakkeroidforce-pushed theallow-iid-parameter-to-request-distinct-objects branch from67f9537 to23b5b6eCompareOctober 23, 2016 09:39
@hakkeroid
Copy link
ContributorAuthor

No problem. I rebased the branch.

I thought about that. What I could think of was another class attribute like "identifiers" which is a list of possible id's to check. This could be a simple['id'] on the parent class GitlabObject as a sane default and a['id', 'iid'] on the respective subclasses.
Then any id relevant tests can expect a list of identifiers to check against. Although when going into that direction a simple list might not be enough because iid itself isn't clearly distinctive. Only in combination with project_id.

Another possibility could be to have a dedicated class for id handling. Usually
that seems to be too extreme but gitlab's different concepts of "identity"
might justify that.

Anyway I am happy to see you are merging it.

@hakkeroid
Copy link
ContributorAuthor

Sorry I just saw that there is indeedGitlabObject.idAttr. That might be an opportunity but as you said; definitely more complex.

@gpocentek
Copy link
Contributor

Let's merge your patch, it's simple enough and fixes a corner case related to gitlab's special behavior. If we need to deal with more special cases in the future we'll consider a more solid solution.

Thank you for tackling this :)

@gpocentekgpocentek merged commit20fdbe8 intopython-gitlab:masterOct 23, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@hakkeroid@gpocentek

[8]ページ先頭

©2009-2025 Movatter.jp