-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sam/remove-atb-from-default-pixel-parameters
# By Daniel Bernal (33) and others # Via Mariusz Śpiewak (5) and others * main: (245 commits) Fix inconsistent bars state when scrolling (#2733) fix tests (#2732) Release 7.115.0-4 (#2729) Fix VPN denial prompt loop (#2728) Small UI Fixes for subscriptions (#2690) SPM updated: SwiftSoup, Lottie, ZIPFoundation (#2724) Release 7.115.0-3 (#2727) VPN: Specific TunnelController start failure reporting (#2714) update bsk dependency (#2725) Subscriptions: Fix thread issue on Subscription Restore (#2719) Manage ‘Stale’ PRs (#2723) maestro: hide dax dialogs if visible and cancel keyboard after fireproof (#2695) Remove timezone offset from the VPN server object (#2701) Reverting accidental push to main (#2718) Add SubscriptionContainerViewModel and Manually hide loader + Pixel (#2687) Release 7.115.0-2 (#2712) soft revert history suggestions (#2711) Bring back accessibility identifiers for onboarding buttons (#2709) BSK release 133.1.0 (#2708) ... # Conflicts: # Core/Pixel.swift
- Loading branch information
Showing
814 changed files
with
39,628 additions
and
12,239 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
name: Asana PR Task URL | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited, closed, unlabeled, synchronize] | ||
|
||
jobs: | ||
|
||
# This job is used to assert that the task linked in the PR description belongs to the specified project (App Board). | ||
assert-project-membership: | ||
|
||
name: Check App Board Project Membership | ||
|
||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
task_id: ${{ steps.get-task-id.outputs.task_id }} | ||
failure: ${{ steps.check-task-url.outputs.failure }} | ||
|
||
steps: | ||
- name: Get Task ID | ||
id: get-task-id | ||
env: | ||
BODY: ${{ github.event.pull_request.body }} | ||
run: | | ||
task_id=$(grep -i "task/issue url.*https://app.asana.com/" <<< "$BODY" \ | ||
| sed -E 's|.*https://(.*)|\1|' \ | ||
| cut -d '/' -f 4) | ||
echo "task_id=$task_id" >> $GITHUB_OUTPUT | ||
- name: Check Task URL | ||
id: check-task-url | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
ASANA_PROJECT_ID: ${{ vars.IOS_APP_BOARD_ASANA_PROJECT_ID }} | ||
run: | | ||
project_ids="$(curl -fLSs "https://app.asana.com/api/1.0/tasks/${{ steps.get-task-id.outputs.task_id }}?opt_fields=projects" \ | ||
-H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \ | ||
| jq -r .data.projects[].gid)" | ||
if grep -q "\b${{ env.ASANA_PROJECT_ID }}\b" <<< $project_ids; then | ||
echo "failure=0" >> $GITHUB_OUTPUT | ||
else | ||
echo "failure=1" >> $GITHUB_OUTPUT | ||
fi | ||
# If a task URL is present, but task is missing from the App Board project, add a comment to the PR and fail the check. | ||
# Otherwise, delete the comment and pass the check. | ||
update-project-membership-report: | ||
|
||
name: App Board Project Membership Report | ||
|
||
runs-on: ubuntu-latest | ||
if: github.event.action != 'closed' | ||
|
||
needs: [assert-project-membership] | ||
|
||
steps: | ||
- name: Comment on the PR | ||
if: ${{ needs.assert-project-membership.outputs.task_id && needs.assert-project-membership.outputs.failure == '1' }} | ||
env: | ||
ASANA_PROJECT_NAME: ${{ vars.IOS_APP_BOARD_ASANA_PROJECT_NAME }} | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: asana-task-check-status | ||
message: | | ||
:no_entry_sign: The Asana task linked in the PR description is not added to ${{ env.ASANA_PROJECT_NAME }} project. | ||
1. Verify that the correct task is linked in the PR. | ||
* :warning: Please use the actual implementation task, rather than the Code Review subtask. | ||
2. Verify that the task is added to ${{ env.ASANA_PROJECT_NAME }} project. | ||
3. When ready, remove the `bot: not in app board` label to retrigger the check. | ||
- name: Add a label to the PR | ||
if: ${{ needs.assert-project-membership.outputs.task_id && needs.assert-project-membership.outputs.failure == '1' }} | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['bot: not in app board'] | ||
}) | ||
- name: Delete comment on the PR | ||
if: ${{ needs.assert-project-membership.outputs.task_id == '' || needs.assert-project-membership.outputs.failure == '0' }} | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: asana-task-check-status | ||
delete: true | ||
|
||
- name: Remove the label from the PR | ||
if: ${{ needs.assert-project-membership.outputs.task_id == '' || needs.assert-project-membership.outputs.failure == '0' }} | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
try { | ||
await github.rest.issues.removeLabel({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: 'bot: not in app board' | ||
}); | ||
} catch (error) { | ||
if (error.status !== 404) { | ||
throw error; | ||
} | ||
} | ||
- name: Report status | ||
if: ${{ needs.assert-project-membership.outputs.task_id }} | ||
run: exit ${{ needs.assert-project-membership.outputs.failure }} | ||
|
||
# When a PR is merged, move the task to the Waiting for Release section of the App Board. | ||
mark-waiting-for-release: | ||
|
||
name: Move to Waiting for Release on Merge | ||
|
||
runs-on: ubuntu-latest | ||
if: github.event.action == 'closed' && github.event.pull_request.merged == true | ||
|
||
needs: [assert-project-membership] | ||
|
||
steps: | ||
- name: Move to Waiting for Release | ||
if: ${{ needs.assert-project-membership.result.failure == '0' }} | ||
env: | ||
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
ASANA_PROJECT_ID: ${{ vars.IOS_APP_BOARD_ASANA_PROJECT_ID }} | ||
run: | | ||
curl -fLSs -X POST "https://app.asana.com/api/1.0/sections/${{ vars.IOS_APP_BOARD_WAITING_FOR_RELEASE_SECTION_ID }}/addTask" \ | ||
-H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \ | ||
-H "Content-Type: application/json" \ | ||
--output /dev/null \ | ||
-d "{\"data\": {\"task\": \"${{ needs.assert-project-membership.outputs.task_id }}\"}}" |
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Close Stale Pull Requests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
close_stale_prs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Close stale pull requests | ||
uses: actions/stale@v9 | ||
with: | ||
stale-pr-message: 'This PR has been inactive for more than 7 days and will be automatically closed 7 days from now.' | ||
days-before-stale: 7 | ||
close-pr-message: 'This PR has been closed after 14 days of inactivity. Feel free to reopen it if you plan to continue working on it or have further discussions.' | ||
days-before-close: 7 | ||
stale-pr-label: stale | ||
exempt-draft-pr: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# tabs.yaml | ||
appId: com.duckduckgo.mobile.ios | ||
tags: | ||
- release | ||
|
||
--- | ||
|
||
# Set up | ||
- clearState | ||
- launchApp | ||
- runFlow: | ||
when: | ||
visible: | ||
text: "Let’s Do It!" | ||
index: 0 | ||
file: ../shared/onboarding.yaml | ||
|
||
# Load Site | ||
- assertVisible: | ||
id: "searchEntry" | ||
- tapOn: | ||
id: "searchEntry" | ||
- inputText: "https://privacy-test-pages.site" | ||
- pressKey: Enter | ||
|
||
# Manage onboarding | ||
- runFlow: | ||
when: | ||
visible: | ||
text: "Got It" | ||
index: 0 | ||
file: ../shared/onboarding_browsing.yaml | ||
|
||
- assertVisible: ".*Privacy Test Pages.*" | ||
- tapOn: "Links Open in New Window" | ||
|
||
# Validate there's one tab | ||
- runFlow: | ||
file: ../shared/check_number_of_tabs.yaml | ||
env: | ||
TITLE: "1 Private Tab" | ||
|
||
- tapOn: "Opens in new window" | ||
- runFlow: | ||
file: ../shared/check_number_of_tabs.yaml | ||
env: | ||
TITLE: "2 Private Tabs" | ||
|
||
- tapOn: "Close" | ||
- assertVisible: "A link that opens in a new window" | ||
- tapOn: "Opens in new window" | ||
- runFlow: | ||
file: ../shared/check_number_of_tabs.yaml | ||
env: | ||
TITLE: "2 Private Tabs" | ||
|
||
- tapOn: "Browse Back" | ||
- assertVisible: "A link that opens in a new window" | ||
|
||
# Workaround - for some reason Tab Switcher button is not found by maestro at this point. | ||
- tapOn: "Refresh Page" | ||
- runFlow: | ||
file: ../shared/check_number_of_tabs.yaml | ||
env: | ||
TITLE: "1 Private Tab" |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
appId: com.duckduckgo.mobile.ios | ||
tags: | ||
- privacy | ||
|
||
--- | ||
|
||
# Set up | ||
- clearState | ||
- launchApp | ||
- runFlow: | ||
when: | ||
visible: | ||
text: "Let’s Do It!" | ||
index: 0 | ||
file: ../shared/onboarding.yaml | ||
|
||
# Load Site | ||
- assertVisible: | ||
id: "searchEntry" | ||
- tapOn: | ||
id: "searchEntry" | ||
- inputText: "https://setcookie.net" | ||
- pressKey: Enter | ||
- runFlow: | ||
file: ../shared/hide_daxdialogs.yaml | ||
|
||
# Set a cookie | ||
- assertVisible: "Cookie Test" | ||
- tapOn: "Cookie name" | ||
- inputText: "TestName" | ||
- tapOn: "Cookie value" | ||
- inputText: "TestValue" | ||
- tapOn: "Done" | ||
- scrollUntilVisible: | ||
element: | ||
text: "Submit" | ||
- tapOn: "Submit" | ||
|
||
# Fireproof the site | ||
- tapOn: "Browsing Menu" | ||
- tapOn: "Fireproof This Site" | ||
- tapOn: "Fireproof" | ||
- assertVisible: "setcookie.net is now Fireproof" | ||
|
||
# Fire Button - twice, just to be sure | ||
- tapOn: "Close Tabs and Clear Data" | ||
- tapOn: | ||
id: "alert.forget-data.confirm" | ||
- assertVisible: "Cancel" | ||
- tapOn: "Cancel" | ||
- assertVisible: | ||
id: "searchEntry" | ||
- tapOn: "Close Tabs and Clear Data" | ||
- tapOn: | ||
id: "alert.forget-data.confirm" | ||
|
||
# Validate Cookie was retained | ||
- tapOn: | ||
id: "searchEntry" | ||
- inputText: "https://setcookie.net" | ||
- pressKey: Enter | ||
- assertVisible: "TestName = TestValue" | ||
|
||
# Remove fireproofing | ||
- tapOn: "Browsing Menu" | ||
- tapOn: "Remove Fireproofing" | ||
|
||
# Fire Button | ||
- tapOn: "Close Tabs and Clear Data" | ||
- tapOn: | ||
id: "alert.forget-data.confirm" | ||
|
||
# Validate Cookie was removed | ||
- tapOn: | ||
id: "searchEntry" | ||
- inputText: "https://setcookie.net" | ||
- pressKey: Enter | ||
- assertVisible: "Cookie Test" | ||
- assertVisible: "Received no cookies." |
Oops, something went wrong.