Skip to content

#616: deduplicate repos matched by overlapping masks in unmask_repos - #618

Merged
yegor256 merged 1 commit into
zerocracy:masterfrom
morphqdd:616
Sep 1, 2026
Merged

#616: deduplicate repos matched by overlapping masks in unmask_repos#618
yegor256 merged 1 commit into
zerocracy:masterfrom
morphqdd:616

Conversation

@morphqdd

Copy link
Copy Markdown
Contributor

Closes #616.

Fbe.unmask_repos appended matches from every inclusion mask independently, so a repository matched by both an exact-name mask and a wildcard mask (e.g. yegor256/factbase,Yegor256/*) survived to the final list twice and was yielded — and processed — twice per run. A repos.uniq! now runs right after the exclusion pass, before the archived-repos filter, so duplicates also don't cost an extra octo.repository call each.

The new test reproduces the overlap from the issue and asserts the list is duplicate-free while still containing the doubly-matched repo; it fails on master.

Tests: 13 tests, 0 failures; rubocop: no offenses.

@morphqdd

Copy link
Copy Markdown
Contributor Author

@yegor256, please take a look when you have a moment.

1 similar comment
@morphqdd

Copy link
Copy Markdown
Contributor Author

@yegor256, please take a look when you have a moment.

@morphqdd

Copy link
Copy Markdown
Contributor Author

@yegor256, review please

@morphqdd

Copy link
Copy Markdown
Contributor Author

@yegor256, please take a look when you have a moment.

@yegor256
yegor256 merged commit 42e5ca9 into zerocracy:master Sep 1, 2026
10 checks passed

yegor256 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution!


Generated by Claude Code

@0crat

0crat commented Sep 1, 2026

Copy link
Copy Markdown

@morphqdd Thanks for the contribution! You've earned +20 points for this: +24 as a basis; -4 for too few (8) hits-of-code. Please, keep them coming. Your running score is +668; don't forget to check your Zerocracy account too).

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.

Fbe.unmask_repos yields the same repository twice when an exact-name mask overlaps a wildcard mask

3 participants