Skip to content

Commit

Permalink
Merge branch 'trunk' into feat/10428-existing-bundled-item-and-quanti…
Browse files Browse the repository at this point in the history
…ty-rules

* trunk: (191 commits)
  Update WooCommerce/WooCommerceTests/ViewRelated/LedgerTableViewCellTests.swift
  Update WooCommerce/Classes/ViewRelated/ReusableViews/LedgerTableViewCell.swift
  Update WooCommerce/Classes/ViewRelated/Orders/Order Creation/CustomAmounts/OrderCustomAmountsSection.swift
  Move track event to viewmodel. Add tests
  Separate add-edit track events to separate methods
  Update test
  Track tap on add and edit discount
  Update “Add” discount event button
  update release notes
  Refactor totalPriceAfterDiscountLabel
  Update CocoaPods
  Update Dangermattic gem
  Move Dangerfile to project root, per Danger standard
  Update how activesupport version is locked
  Improve Dangerfile code
  Use DANGER_GITHUB_API_TOKEN from CI env
  Fix Cocoapods Active Support issue (CocoaPods/CocoaPods#12081)
  Add initial Danger setup with Dangermattic
  11009 Add hiding of Set up button to 16.0 release
  Fix hound warning
  ...

# Conflicts:
#	WooCommerce/WooCommerceTests/ViewRelated/Orders/Order Creation/ProductRowViewModelTests.swift
  • Loading branch information
jaclync committed Oct 27, 2023
2 parents 08f65fd + bc39d81 commit f48bfeb
Show file tree
Hide file tree
Showing 91 changed files with 1,899 additions and 1,393 deletions.
2 changes: 1 addition & 1 deletion .buildkite/cache-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#2.18.2
- automattic/a8c-ci-toolkit#3.0.0
- automattic/git-s3-cache#1.1.4:
bucket: "a8c-repo-mirrors"
# This is not necessarily the actual name of the repo or the GitHub organization
Expand Down
7 changes: 7 additions & 0 deletions .buildkite/commands/danger-pr-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -eu

echo "--- :rubygems: Setting up Gems"
bundle install

echo "--- Running Danger: PR Check"
bundle exec danger --fail-on-errors=true --remove-previous-comments --danger_id=pr-check
16 changes: 15 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#2.18.2
- automattic/a8c-ci-toolkit#3.0.0
- automattic/git-s3-cache#1.1.4:
bucket: "a8c-repo-mirrors"
# This is not necessarily the actual name of the repo or the GitHub organization
Expand Down Expand Up @@ -59,6 +59,20 @@ steps:
#################
- group: Linters
steps:
- label: "☢️ Danger - PR Check"
command: .buildkite/commands/danger-pr-check.sh
plugins:
- docker#v5.8.0:
image: "public.ecr.aws/docker/library/ruby:3.2.2"
propagate-environment: true
environment:
- "DANGER_GITHUB_API_TOKEN"
if: "build.pull_request.id != null"
agents:
queue: "default"
retry:
manual:
permit_on_passed: true
- label: "🧹 Lint Translations"
command: "gplint /workdir/WooCommerce/Resources/AppStoreStrings.pot"
plugins:
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/release-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#2.18.2
- automattic/a8c-ci-toolkit#3.0.0
- automattic/git-s3-cache#1.1.4:
bucket: "a8c-repo-mirrors"
# This is not necessarily the actual name of the repo or the GitHub organization
Expand Down
37 changes: 37 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# frozen_string_literal: true

def release_branch?
danger.github.branch_for_base.start_with?('release/') || danger.github.branch_for_base.start_with?('hotfix/')
end

def main_branch?
danger.github.branch_for_base == 'trunk'
end

def wip_feature?
has_wip_label = github.pr_labels.any? { |label| label.include?('WIP') }
has_wip_title = github.pr_title.include?('WIP')

has_wip_label || has_wip_title
end

return if github.pr_labels.include?('Releases')

github.dismiss_out_of_range_messages

manifest_pr_checker.check_all_manifest_lock_updated

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: 2) if !github.pr_draft? && (!wip_feature? || (release_branch? || main_branch?))

rubocop.lint(inline_comment: true, fail_on_inline_comment: true, include_cop_names: true)
4 changes: 0 additions & 4 deletions Experiments/Experiments/DefaultFeatureFlagService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,9 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
case .giftCardInOrderForm:
return true
case .wooPaymentsDepositsOverviewInPaymentsMenu:
return (buildConfig == .localDeveloper || buildConfig == .alpha) && !isUITesting
case .orderCustomAmountsM1:
return buildConfig == .localDeveloper || buildConfig == .alpha
case .tapToPayOnIPhoneInUK:
return true
case .optimizedBlazeExperience:
return buildConfig == .localDeveloper || buildConfig == .alpha
case .productBundlesInOrderForm:
return buildConfig == .localDeveloper || buildConfig == .alpha
default:
Expand Down
8 changes: 0 additions & 8 deletions Experiments/Experiments/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,6 @@ public enum FeatureFlag: Int {
///
case tapToPayOnIPhoneInUK

/// Enables the functionality related to order custom amounts on M1
///
case orderCustomAmountsM1

/// Enables a new section on the My Store screen and a new entry point to the campaign list.
///
case optimizedBlazeExperience

/// Enables bundle product configuration support in order creation/editing.
///
case productBundlesInOrderForm
Expand Down
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ group :screenshots, optional: true do
gem 'rmagick', '~> 4.1'
end

# 1.13.x and higher, but less than 2.x, starting from 1.13.0
gem 'cocoapods', '~> 1.13', '>= 1.13.0'
gem 'cocoapods', '~> 1.14'
gem 'cocoapods-catalyst-support', '~> 0.1'
gem 'dotenv'
gem 'fastlane', '~> 2'
Expand All @@ -22,3 +21,5 @@ gem 'rubocop', '~> 1.56'
gem 'rubocop-rake', '~> 0.6'
gem 'xcode-install'
gem 'xcpretty-travis-formatter'

gem 'danger-dangermattic', git: 'https://github.com/Automattic/dangermattic'

0 comments on commit f48bfeb

Please sign in to comment.