-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into task/stats-insights-diffable-optimization
- Loading branch information
Showing
312 changed files
with
14,532 additions
and
9,719 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash -eu | ||
|
||
RELEASE_NUMBER=$1 | ||
|
||
if [[ -z "${RELEASE_NUMBER}" ]]; then | ||
echo "Usage $0 <release number>" | ||
exit 1 | ||
fi | ||
|
||
echo '--- :git: Configure Git for release management' | ||
.buildkite/commands/configure-git-for-release-management.sh | ||
|
||
echo '--- :git: Checkout release branch' | ||
.buildkite/commands/checkout-release-branch.sh "$RELEASE_NUMBER" | ||
|
||
echo '--- :ruby: Setup Ruby tools' | ||
install_gems | ||
|
||
echo '--- :closed_lock_with_key: Access secrets' | ||
bundle exec fastlane run configure_apply | ||
|
||
echo '--- :shipit: Finalize hotfix' | ||
bundle exec fastlane finalize_hotfix_release skip_confirm: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash -eu | ||
|
||
RELEASE_NUMBER=$1 | ||
|
||
if [[ -z "${RELEASE_NUMBER}" ]]; then | ||
echo "Usage $0 <release number>" | ||
exit 1 | ||
fi | ||
|
||
echo '--- :git: Checkout release branch' | ||
.buildkite/commands/configure-git-for-release-management.sh | ||
.buildkite/commands/checkout-release-branch.sh "$RELEASE_NUMBER" | ||
|
||
echo '--- :ruby: Setup Ruby tools' | ||
install_gems | ||
|
||
echo '--- :cocoapods: Install Pods (required to check for outdated next)' | ||
install_cocoapods | ||
|
||
# Expand this group to surface the information. | ||
# | ||
# It's simpler than capturing the CocoaPods output, filtering, and annotating the build with it. | ||
echo '+++ :cocoapods: Outdated Pods' | ||
bundle exec pod outdated |
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,10 +1,26 @@ | ||
common_params: | ||
# Common plugin settings to use with the `plugins` key. | ||
- &common_plugins | ||
- automattic/a8c-ci-toolkit#2.18.1 | ||
# Common environment values to use with the `env` key. | ||
- &common_env | ||
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here | ||
IMAGE_ID: xcode-15.1 | ||
|
||
steps: | ||
- label: Complete Code Freeze | ||
plugins: | ||
- automattic/a8c-ci-toolkit#2.18.2 | ||
key: complete_code_freeze | ||
plugins: *common_plugins | ||
env: *common_env | ||
# The code freeze completion needs to run on macOS because it uses genstrings under the hood | ||
agents: | ||
queue: mac | ||
env: | ||
IMAGE_ID: xcode-15.1 | ||
command: ".buildkite/commands/complete-code-freeze.sh $RELEASE_VERSION" | ||
|
||
- label: Log Outdated Pods | ||
depends_on: complete_code_freeze | ||
plugins: *common_plugins | ||
env: *common_env | ||
agents: | ||
queue: mac | ||
command: ".buildkite/commands/log-outdated-pods.sh $RELEASE_VERSION" |
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,10 @@ | ||
steps: | ||
- label: Finalize Release | ||
plugins: | ||
- automattic/a8c-ci-toolkit#2.18.2 | ||
# The finalization needs to run on macOS because of localization linting | ||
agents: | ||
queue: mac | ||
env: | ||
IMAGE_ID: xcode-15.1 | ||
command: ".buildkite/commands/finalize-hotfix.sh $VERSION" |
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,21 @@ | ||
steps: | ||
- label: New Hotfix Deployment | ||
plugins: | ||
- automattic/a8c-ci-toolkit#2.18.2 | ||
# The beta needs to run on macOS because it uses genstrings under the hood | ||
agents: | ||
queue: mac | ||
env: | ||
IMAGE_ID: xcode-15.1 | ||
command: | | ||
echo '--- :git: Configure Git for release management' | ||
.buildkite/commands/configure-git-for-release-management.sh | ||
echo '--- :ruby: Setup Ruby tools' | ||
install_gems | ||
echo '--- :closed_lock_with_key: Access secrets' | ||
bundle exec fastlane run configure_apply | ||
echo '--- :shipit: Start new hotfix' | ||
bundle exec fastlane new_hotfix_release skip_confirm:true version:"$VERSION" |
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 |
---|---|---|
|
@@ -2,10 +2,12 @@ name: ☢️ Danger | |
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, edited, review_requested, review_request_removed, labeled, unlabeled, milestoned, demilestoned] | ||
types: [opened, reopened, ready_for_review, synchronize, edited, labeled, unlabeled, milestoned, demilestoned] | ||
|
||
jobs: | ||
dangermattic: | ||
uses: Automattic/dangermattic/.github/workflows/reusable-run-danger.yml@trunk | ||
# runs on draft PRs only for opened / synchronize events | ||
if: ${{ (github.event.pull_request.draft == false) || (github.event.pull_request.draft == true && contains(fromJSON('["opened", "synchronize"]'), github.event.action)) }} | ||
uses: Automattic/dangermattic/.github/workflows/[email protected] | ||
secrets: | ||
github-token: ${{ secrets.DANGERMATTIC_GITHUB_TOKEN }} |
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,18 @@ | ||
name: 📝 Validate Issues | ||
|
||
on: | ||
issues: | ||
types: [opened, labeled, unlabeled] | ||
|
||
jobs: | ||
check-labels-on-issues: | ||
uses: Automattic/dangermattic/.github/workflows/[email protected] | ||
with: | ||
label-format-list: '[ | ||
"^\[.+\]", | ||
"^[[:alnum:]]" | ||
]' | ||
label-error-message: '🚫 Please add a type label (e.g. **[Type] Enhancement**) and a feature label (e.g. **Stats**) to this issue.' | ||
label-success-message: 'Thanks for reporting! 👍' | ||
secrets: | ||
github-token: ${{ secrets.DANGERMATTIC_GITHUB_TOKEN }} |
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
26 changes: 26 additions & 0 deletions
26
...PressMocks/src/main/assets/mocks/mappings/wpcom/reader/rest_v12_read_following_empty.json
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,26 @@ | ||
{ | ||
"scenarioName": "reader_subscriptions_flow", | ||
"requiredScenarioState": "initial_subscriptions_list", | ||
"newScenarioState": "empty_subscriptions_list", | ||
"request": { | ||
"method": "GET", | ||
"urlPath": "/rest/v1.2/read/following" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"date_range": { | ||
"before": "2019-05-23T13:00:09+00:00", | ||
"after": "2021-05-17T16:34:44+00:00" | ||
}, | ||
"number": 0, | ||
"posts": [ | ||
] | ||
}, | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Connection": "keep-alive", | ||
"Cache-Control": "no-cache, must-revalidate, max-age=0" | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,37 +1,42 @@ | ||
# frozen_string_literal: true | ||
|
||
def release_branch? | ||
danger.github.branch_for_base.start_with?('release/') || danger.github.branch_for_base.start_with?('hotfix/') | ||
end | ||
github.dismiss_out_of_range_messages | ||
|
||
def main_branch? | ||
danger.github.branch_for_base == 'trunk' | ||
end | ||
# `files: []` forces rubocop to scan all files, not just the ones modified in the PR | ||
rubocop.lint(files: [], force_exclusion: true, inline_comment: true, fail_on_inline_comment: true, include_cop_names: true) | ||
|
||
def wip_feature? | ||
has_wip_label = github.pr_labels.any? { |label| label.include?('WIP') } | ||
has_wip_title = github.pr_title.include?('WIP') | ||
manifest_pr_checker.check_all_manifest_lock_updated | ||
|
||
has_wip_label || has_wip_title | ||
podfile_checker.check_podfile_does_not_have_branch_references | ||
|
||
ios_release_checker.check_core_data_model_changed | ||
ios_release_checker.check_release_notes_and_app_store_strings | ||
|
||
# skip remaining checks if we're in a release-process PR | ||
if github.pr_labels.include?('Releases') | ||
message('This PR has the `Releases` label: some checks will be skipped.') | ||
return | ||
end | ||
|
||
return if github.pr_labels.include?('Releases') | ||
common_release_checker.check_internal_release_notes_changed(report_type: :message) | ||
|
||
github.dismiss_out_of_range_messages | ||
ios_release_checker.check_modified_translations_on_release_branch | ||
|
||
manifest_pr_checker.check_all_manifest_lock_updated | ||
view_changes_checker.check | ||
|
||
pr_size_checker.check_diff_size(max_size: 500) | ||
|
||
# skip remaining checks if the PR is still a Draft | ||
if github.pr_draft? | ||
message('This PR is still a Draft: some checks will be skipped.') | ||
return | ||
end | ||
|
||
labels_checker.check( | ||
do_not_merge_labels: ['[Status] DO NOT MERGE'], | ||
required_labels: [//], | ||
required_labels_error: 'PR requires at least one label.' | ||
) | ||
|
||
view_changes_need_screenshots.view_changes_need_screenshots | ||
|
||
pr_size_checker.check_diff_size | ||
|
||
# skip check for draft PRs and for WIP features unless the PR is against the main branch or release branch | ||
milestone_checker.check_milestone_due_date(days_before_due: 4) unless github.pr_draft? || (wip_feature? && !(release_branch? || main_branch?)) | ||
|
||
rubocop.lint(inline_comment: true, fail_on_inline_comment: true, include_cop_names: true) | ||
# runs the milestone check if this is not a WIP feature and the PR is against the main branch or the release branch | ||
milestone_checker.check_milestone_due_date(days_before_due: 4) if (github_utils.main_branch? || github_utils.release_branch?) && !github_utils.wip_feature? |
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
Oops, something went wrong.