-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quirks/websites-with-shared-credential-backends.json should be removed …
- Loading branch information
Showing
6 changed files
with
33 additions
and
958 deletions.
There are no files selected for viewing
16 changes: 13 additions & 3 deletions
16
.github/workflows/lint-scripts/websites-shared-credentials-duplicates.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
require 'json' | ||
require 'set' | ||
|
||
shared_websites = JSON.parse(File.read('quirks/websites-with-shared-credential-backends.json')) | ||
KEYS = ["from", "to", "shared"] | ||
|
||
shared_credentials = JSON.parse(File.read('quirks/shared-credentials.json')) | ||
shared_credentials_historical = JSON.parse(File.read('quirks/shared-credentials-historical.json')) | ||
|
||
domains = [] | ||
(shared_credentials + shared_credentials_historical).each do |entry| | ||
KEYS.each do |key| | ||
domains += entry[key] if entry[key] | ||
end | ||
end | ||
|
||
seen_domains = Set.new | ||
shared_websites.flatten.each do |domain| | ||
domains.each do |domain| | ||
STDERR.puts "The domain '#{domain}' appears more than once!" if seen_domains.include?(domain) | ||
seen_domains << domain | ||
end | ||
|
||
exit(1) if seen_domains.count != shared_websites.flatten.count | ||
exit(1) if seen_domains.count != domains.count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
quirks/schemas/websites-with-shared-credential-backends-schema.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.