Skip to content

Add test coverage for team membership sync scripts#31

Merged
lubianat merged 2 commits intomainfrom
copilot/add-tests-for-scripts
Jan 23, 2026
Merged

Add test coverage for team membership sync scripts#31
lubianat merged 2 commits intomainfrom
copilot/add-tests-for-scripts

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

The core team synchronization scripts (yaml_to_github.py, github_to_yaml.py) had no test coverage for their primary functionality.

Changes

  • test_yaml_to_github.py (10 tests): Verifies YAML → GitHub sync behavior

    • Adding org members to teams
    • Inviting non-org members when adding to teams
    • Removing members from teams
    • Preventing duplicate invites
  • test_github_to_yaml.py (13 tests): Verifies GitHub → YAML export behavior

    • Exporting team membership changes
    • Handling org member removals across all teams
    • Preserving pending invites during export
    • YAML rendering and state loading

All tests use mocked API responses to avoid live GitHub calls. Test count: 16 → 39.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add tests to make sure scripts do what they are supposed</issue_title>
<issue_description>Monkey-patching the organization information, test if changes are what one would expect.

For the YAML:

  • adding someone to a team that is in the org
  • adding someone to a team that is not in the org
  • remove someone from the team

For the GitHub settings:

  • adding someone to a team that is in the org
  • removing someone from a team
  • removing someone from the org</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: lubianat <7917951+lubianat@users.noreply.github.com>
Copilot AI changed the title [WIP] Add tests for organization information scripts Add test coverage for team membership sync scripts Jan 23, 2026
Copilot AI requested a review from lubianat January 23, 2026 11:42
@lubianat lubianat marked this pull request as ready for review January 23, 2026 13:00
@lubianat
Copy link
Member

lgtm

@lubianat lubianat merged commit ebb9cfd into main Jan 23, 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.

Add tests to make sure scripts do what they are supposed

2 participants