Skip to content

Preserve existing users and leaders in NewRepo requests#20

Merged
2Ryan09 merged 4 commits into
mainfrom
restore-preserve-users-newrepo
Jun 19, 2026
Merged

Preserve existing users and leaders in NewRepo requests#20
2Ryan09 merged 4 commits into
mainfrom
restore-preserve-users-newrepo

Conversation

@2Ryan09

@2Ryan09 2Ryan09 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@2Ryan09
2Ryan09 requested a review from pjpascual June 18, 2026 18:50
@2Ryan09
2Ryan09 marked this pull request as ready for review June 18, 2026 20:40
@2Ryan09
2Ryan09 requested a review from Copilot June 18, 2026 20:40

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the RepoRegistration.do_new_repo() workflow to make NewRepo requests idempotent by preserving existing repository users and leaders when re-running repo creation, and extends the test suite to cover the new behavior.

Changes:

  • Added a pre-upsert GraphQL query in do_new_repo() to preserve existing users/leaders and pass repo_users into the Ansible add_repo.yaml playbook.
  • Updated existing GID-related tests to account for the new initial GraphQL call and playbook parameter.
  • Added new tests covering NewRepo idempotency for both fresh and re-run scenarios.

Reviewed changes

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

File Description
modules/coactd.py Adds repo lookup logic to preserve existing users/leaders and passes repo_users into the playbook and upsert payload.
tests/test_repo_registration_gid.py Updates existing tests for the extra GraphQL call and adds new idempotency-focused test coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/coactd.py
Comment thread tests/test_repo_registration_gid.py Outdated
Comment thread tests/test_repo_registration_gid.py Outdated
Comment thread tests/test_repo_registration_gid.py Outdated
Comment thread tests/test_repo_registration_gid.py Outdated
@2Ryan09
2Ryan09 merged commit eaec6a3 into main Jun 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants