Skip to content

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

Open
morphqdd wants to merge 1 commit into
zerocracy:masterfrom
morphqdd:616
Open

#616: deduplicate repos matched by overlapping masks in unmask_repos#618
morphqdd wants to merge 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.

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

1 participant