Skip to content

feat(protected_environments): replace approval groups - #657

Merged
sjungwon03 merged 3 commits into
devfrom
feat/656-replace-environment-approval-group
Oct 18, 2026
Merged

sjungwon03 merged 3 commits into
devfrom
feat/656-replace-environment-approval-group

Conversation

@sjungwon03

Copy link
Copy Markdown
Member

Summary

Project protected-environment approval rules can now replace their group by
exact shared group ID. Select an existing group-only rule, enter a different
positive group ID and the exact environment name, and acknowledge the change.
Unknown membership, user/role rules, unchanged or already represented groups,
and group-level rules cannot be edited.

Complete inventory/detail preflight precedes one non-replayed, non-redirected
PUT containing only the existing rule ID and new group ID. Response and strict
read-back preserve stable identity, approval count, membership, every other
approval/deploy record and legacy count. Only the selected group's display
description may change with its identity; both confirmed snapshots must agree
on that description too. Uncertainty requires inspection and fresh confirmation;
account replacement isolates late results.

Closes #656

Validation

  • dart format --output=none --set-exit-if-changed . (1,004 files, no changes); CI English policy passes
  • flutter analyze --no-pub reports no issues
  • Current dev integrated; app/API suites rerun: app 4,790; API 3,309. Other package suites pass: design system 135; models 204; secure storage 5 (8,443 total).
  • API, controller and UI tests observed failing before implementation
  • Related new/existing approval controller/UI suite: 104 tests pass
  • Generated localization with flutter gen-l10n; models unchanged
  • Five locales, 320/800/1200 widths, both themes and direct/inherited membership
    preservation; invalid/unchanged/duplicate groups, stale/ambiguous rules,
    description-aware comparison, uncertainty, overlap and account replacement.
  • Fixture-only widget validation; no live GitLab role/tier/version validation.

Checklist

  • Targets dev; independent branch from origin/dev, then integrated the approved membership slice from current dev
  • Linked issue with Closes #656
  • Conventional Commits and DCO sign-off
  • Behavior documentation, screenshots and MW-02 evidence updated
  • Mobile/tablet/desktop and light/dark coverage
  • No new dependencies, model changes or external assets; notices unchanged
  • Dummy credentials, reserved example domains and fixture-only screenshots
  • English repository content except supported localization resources

Screenshots

Synthetic widget captures with real local fonts, scrolled to confirmation:

Viewport Light Dark
Mobile Mobile light Mobile dark
Desktop Desktop light Desktop dark

Notes for reviewers

GitLab requires Premium/Ultimate, project CI/CD, management permission and
sharing with the new group. The app does not enumerate approvers or guarantee
the approval count can be satisfied. Group-level writes, user/role conversion,
and group discovery remain separate work. The approved membership-editing slice
from PR #655 is integrated from dev; both features are tested together.

Group descriptions are derived display metadata: changing the group can update
only the selected rule's description. No description is used as identity or
permission evidence. The new response and authoritative read-back must otherwise
exactly agree. The endpoint provides no atomic compare-and-set; another actor
can change the rule between requests. Preservation covers reported/modelled
fields, not unknown server metadata. Existing browsing and other writes are
unchanged; the existing strict approval-group reader is reused.

References: protected-environment update,
implementation notes.

Let maintainers replace one approver group while keeping its record identity, approval count, membership and other protection grants. Allow only the selected display description to follow the new group and require matching authoritative confirmation after a single non-replayed request.

Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
Preserve both approval group operations and their detail actions after the approved membership slice reached dev. Regenerate localization from combined sources and verify the complete app and API suites in the integrated tree.

Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
@github-actions github-actions Bot added area:api packages/gitlab_api — GitLab REST/GraphQL client area:ui Screens and feature UI area:docs AGENTS.md, .agents/, README and friends labels Oct 18, 2026
Record the concrete review artifact while keeping the approval and CI boundary explicit.

Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
@github-actions github-actions Bot added the feat New feature label Oct 18, 2026

@sjungwon03-ai sjungwon03-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review summary

Verdict: Approved

  • Reviewed: protected-environment approval-group replacement flow, transport, and test coverage
  • Checks: CI passed (Flutter quality gate, iOS SDK validation, policy, and triage)

@sjungwon03
sjungwon03 merged commit ab8e3af into dev Oct 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:api packages/gitlab_api — GitLab REST/GraphQL client area:docs AGENTS.md, .agents/, README and friends area:ui Screens and feature UI feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace the group on a protected environment approval rule

2 participants