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

Enable updates on ProjectIssueNotes#113

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 3 commits intopython-gitlab:masterfromadamreid:master
May 12, 2016

Conversation

adamreid
Copy link

According to theGitLab API Docs Issue comments can be updated by api calls. This very minor change enables this in python-gitlab

This is useful to me and perhaps others for things like annotating comments with references to external issue trackers not supported in GitLab already. This change would allow notes on issues to be modified and saved, for example:

importosfromgitlabimportGitlabgl=Gitlab(os.environ['GITLAB_HOST'],os.environ['GITLAB_TOKEN'])note=gl.project.get('adamreid/test').issues.get(1).notes.get(1)note.body=note.body.replace('issue:1234','issue:[1234](http://issues.example.com/issue/1234)')note.save()

@@ -935,7 +935,7 @@ class ProjectHookManager(BaseManager):
classProjectIssueNote(GitlabObject):
_url='/projects/%(project_id)s/issues/%(issue_id)s/notes'
_constructorTypes= {'author':'User'}
canUpdate=False
canUpdate=True
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove the line (canUpdate defaults to True in the GitlabObject class).

Otherwise looks good.

@gpocentekgpocentek merged commitf5c75cb intopython-gitlab:masterMay 12, 2016
@gpocentek
Copy link
Contributor

Thanks!

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
@adamreid@gpocentek

[8]ページ先頭

©2009-2025 Movatter.jp