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(epics): use actual group_id for save/delete operations on nested epics#3279

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

Draft
JohnVillalovos wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromjlvillal/3261_epic_group

Conversation

@JohnVillalovos
Copy link
Member

@JohnVillalovosJohnVillalovos commentedOct 18, 2025
edited
Loading

When an epic belonging to a subgroup is retrieved through a parent
group's epic listing, save() and delete() operations would fail because
they used the parent group's path instead of the epic's actual group_id.

This commit overrides save() and delete() methods in GroupEpic to use
the epic's group_id attribute to construct the correct API path, ensuring
operations work correctly regardless of how the epic was retrieved.

Also add the ability to pass a custom path using_pg_custom_path to
theUpdateMixin.update() andSaveMixin.save() methods. This allowed
the override of theupdate() method to re-use theSaveMixin.save()
method.

Closes:#3261

CopilotAI review requested due to automatic review settingsOctober 18, 2025 17:41
@JohnVillalovosJohnVillalovos marked this pull request as draftOctober 18, 2025 17:41
Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where save() and delete() operations on epics retrieved through a parent group's epic listing would fail because they used the wrong group path. The fix ensures that operations use the epic's actual group_id attribute to construct the correct API path.

  • Overrides save() and delete() methods in GroupEpic to use the epic's group_id for API path construction
  • Adds helper method_epic_path() to compute the correct API path using the epic's real group
  • Adds comprehensive test coverage for both unit and functional scenarios

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
gitlab/v4/objects/epics.pyImplements the fix by overriding save() and delete() methods to use epic's group_id for path construction
tests/unit/objects/test_epics.pyAdds unit tests to verify save() and delete() operations use the correct group path
tests/functional/api/test_epics.pyAdds functional test demonstrating the fix works for nested epics accessed through parent groups

Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/3261_epic_group branch 2 times, most recently from3e855f3 to27bd80cCompareOctober 21, 2025 23:33
Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

@codecov
Copy link

codecovbot commentedOct 22, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.73%. Comparing base (0f5655c) to head (a9638ee).

Additional details and impacted files
@@            Coverage Diff             @@##             main    #3279      +/-   ##==========================================+ Coverage   95.72%   95.73%   +0.01%==========================================  Files          98       98                Lines        6052     6068      +16     ==========================================+ Hits         5793     5809      +16  Misses        259      259
FlagCoverage Δ
api_func_v483.71% <93.75%> (+0.09%)⬆️
cli_func_v478.59% <43.75%> (-0.10%)⬇️
unit90.21% <100.00%> (+0.02%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

Files with missing linesCoverage Δ
gitlab/mixins.py91.55% <100.00%> (+0.04%)⬆️
gitlab/v4/objects/epics.py88.13% <100.00%> (+3.69%)⬆️
🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

…epicsWhen an epic belonging to a subgroup is retrieved through a parentgroup's epic listing, save() and delete() operations would fail becausethey used the parent group's path instead of the epic's actual group_id.This commit overrides save() and delete() methods in GroupEpic to usethe epic's group_id attribute to construct the correct API path, ensuringoperations work correctly regardless of how the epic was retrieved.Also add the ability to pass a custom path using `_pg_custom_path` tothe `UpdateMixin.update()` and `SaveMixin.save()` methods. This allowedthe override of the `update()` method to re-use the `SaveMixin.save()`method.Closes:#3261
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

GroupEpic uses "iid" as ID attribute but should use "id"?

2 participants

@JohnVillalovos

[8]ページ先頭

©2009-2025 Movatter.jp