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

Updates not recognized in 1.0.0 #306

Closed
Labels
@Jake-Shadle

Description

@Jake-Shadle

Before 1.0.0 I was updating attributes with the v4 API on both merge requests and hooks and able to save them correctly as the manager recognized I had modified them and was sending the updates to the API. But after 1.0.0 it appears the UpdateMixin (I assume, not familiar with this code) doesn't recognize changes any longer, which will cause thesave() calls to fail when Gitlab returns a 400 because it wasn't actually asked to change anything.

Here's what my code looked like before

ifnothas_valid_changelog:self.log.info(f"Adding CHANGELOG label to{merge_req.web_url}")if'CHANGELOG'inmerge_req.labels:self.log.info(f"MR{merge_req.web_url} is already tagged with CHANGELOG label")returnmerge_req.labels.append('CHANGELOG')merge_req.save()

And after

ifnothas_valid_changelog:self.log.info(f"Adding CHANGELOG label to{merge_req.web_url}")if'CHANGELOG'inmerge_req.labels:self.log.info(f"MR{merge_req.web_url} is already tagged with CHANGELOG label")returnmerge_req.labels.append('CHANGELOG')# Need to stringize, since this doesn't go through the usual routesetattr(merge_req,'labels',','.join(merge_req.labels))merge_req.save()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp