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

Fix error when fetching single MergeRequests#66

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

Merged
gpocentek merged 2 commits intopython-gitlab:masterfromstefanklug:master
Aug 21, 2015
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletionsgitlab/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,11 @@ def set_url(self, url):

def _construct_url(self, id_, obj, parameters):
args = _sanitize_dict(parameters)
url = obj._url % args
if id_ is None and obj._urlPlural is not None:
url = obj._urlPlural % args
else:
url = obj._url % args

if id_ is not None:
url = '%s%s/%s' % (self._url, url, str(id_))
else:
Expand DownExpand Up@@ -616,6 +620,8 @@ class GitlabObject(object):
"""
#: Url to use in GitLab for this object
_url = None
#some objects (e.g. merge requests) have different urls for singular and plural
_urlPlural = None
_returnClass = None
_constructorTypes = None
#: Whether _get_list_or_object should return list or object when id is None
Expand DownExpand Up@@ -1056,14 +1062,14 @@ class ProjectTag(GitlabObject):
class ProjectMergeRequestNote(GitlabObject):
_url = '/projects/%(project_id)s/merge_requests/%(merge_request_id)s/notes'
_constructorTypes = {'author': 'User'}
canUpdate = False
canDelete = False
requiredUrlAttrs = ['project_id', 'merge_request_id']
requiredCreateAttrs = ['body']


class ProjectMergeRequest(GitlabObject):
_url = '/projects/%(project_id)s/merge_requests'
_url = '/projects/%(project_id)s/merge_request'
_urlPlural = '/projects/%(project_id)s/merge_requests'
_constructorTypes = {'author': 'User', 'assignee': 'User'}
canDelete = False
requiredUrlAttrs = ['project_id']
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp