Skip to content

Commit

Permalink
Add note about Danger matching rules (#1756)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1200194497630846/1205584545360104/f
Tech Design URL:
CC:

**Description**:
Add note about a Danger rule that checks Privacy and TDS files URL
matching.

**Steps to test this PR**:
1. Check CI is green.

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

---
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)
  • Loading branch information
loremattei authored Oct 16, 2023
1 parent 2eaeea5 commit 334a3be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DuckDuckGo/AppDelegate/AppConfigurationURLProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import Configuration
struct AppConfigurationURLProvider: ConfigurationURLProviding {

func url(for configuration: Configuration) -> URL {
// URLs for privacyConfiguration and trackerDataSet shall match the ones in update_embedded.sh.
// Danger checks that the URLs match on every PR. If the code changes, the regex that Danger uses may need an update.
switch configuration {
case .bloomFilterBinary: return URL(string: "https://staticcdn.duckduckgo.com/https/https-mobile-v2-bloom.bin")!
case .bloomFilterSpec: return URL(string: "https://staticcdn.duckduckgo.com/https/https-mobile-v2-bloom-spec.json")!
Expand Down
2 changes: 2 additions & 0 deletions scripts/update_embedded.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -eo pipefail

# The following URLs shall match the ones in AppConfigurationURLprovider.swift.
# Danger checks that the URLs match on every PR. If the code changes, the regex that Danger uses may need an update.
TDS_URL="https://staticcdn.duckduckgo.com/trackerblocking/v5/current/macos-tds.json"
CONFIG_URL="https://staticcdn.duckduckgo.com/trackerblocking/config/v3/macos-config.json"

Expand Down

0 comments on commit 334a3be

Please sign in to comment.