Skip to content

Conversation

@iangmaia
Copy link
Contributor

@iangmaia iangmaia commented Feb 6, 2024

This PR adapts the Dangerfile to the latest Dangermattic version, using newly added plugins, adapting the code as needed and implementing a few improvements.

The main changes:

  • Improvements to the Rubocop check call
  • Added Release Notes / Store strings check
  • Added Tracks Check
  • Added check for translations being changed only on the release branch
  • Added check on the internal release notes being changed
  • Use github_utils plugin instead of locally declared functions
  • Added message report when we're skipping checks due to the Releases label
  • Use officially distributed danger-dangermattic Gem

Testing

The main validation is to make sure CI is 🟢.

To run Danger yourself:

  1. Checkout this branch
  2. Run bundle install
  3. Run:
DANGER_GITHUB_API_TOKEN=<github_token> bundle exec danger pr <PR_URL>

You should get in the console the same errors / warnings reported in the PR.

@iangmaia iangmaia added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label Feb 6, 2024
@iangmaia iangmaia self-assigned this Feb 6, 2024
@iangmaia iangmaia force-pushed the iangmaia/dangermattic-update branch from 28e714a to 8af6349 Compare February 6, 2024 18:54
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Feb 6, 2024

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
FlavorJalapeno
Build TypeDebug
Commit6b02b68
Direct Downloadwoocommerce-prototype-build-pr10692-6b02b68.apk

@iangmaia iangmaia force-pushed the iangmaia/dangermattic-update branch 2 times, most recently from 4395706 to 100e213 Compare February 8, 2024 13:16
@iangmaia iangmaia marked this pull request as ready for review February 8, 2024 14:54
@peril-woocommerce
Copy link

Warnings
⚠️ PR is not assigned to a milestone.

Generated by 🚫 dangerJS

@dangermattic
Copy link
Collaborator

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@iangmaia iangmaia requested review from a team and mokagio February 8, 2024 15:53
Copy link
Contributor

@mokagio mokagio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock. The same comments from the Pocket Casts iOS PR apply here, Automattic/pocket-casts-ios#1418 (review), but none of them were blocking.

@iangmaia iangmaia force-pushed the iangmaia/dangermattic-update branch from 4249d17 to 6b02b68 Compare February 14, 2024 12:14
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1f4b476) 41.15% compared to head (4249d17) 41.45%.

❗ Current head 4249d17 differs from pull request most recent head 6b02b68. Consider uploading reports for the commit 6b02b68 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #10692      +/-   ##
============================================
+ Coverage     41.15%   41.45%   +0.29%     
  Complexity     5017     5017              
============================================
  Files          1023     1016       -7     
  Lines         58781    58348     -433     
  Branches       7852     7804      -48     
============================================
- Hits          24193    24189       -4     
+ Misses        32444    32015     -429     
  Partials       2144     2144              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iangmaia iangmaia enabled auto-merge February 14, 2024 13:16
@iangmaia iangmaia merged commit a91035c into trunk Feb 14, 2024
@iangmaia iangmaia deleted the iangmaia/dangermattic-update branch February 14, 2024 13:28
mokagio added a commit to wordpress-mobile/WordPress-Android that referenced this pull request Dec 2, 2025
This Danger check was out of place as
`WordPress/src/main/res/values/strings.xml` is the source of truth for
localizations.

Unlike in Apple projects, where we use `genstrings` to find localized
strings in the codebase to assemble the `strings` file, in Android, as
far as I understand, `<app>/src/main/res/valudes/strings.xml` is the
source of truth.

I believe this check ended up in `Dangerfile` accidentally. It was
introduced in
#20132.
The update was done across our suite of apps, see for example
woocommerce/woocommerce-android#10692 and
woocommerce/woocommerce-ios#11926. Given I
couldn't find a comment explicitly about adopting this check, I guess
neither @iangmaia nor myself notice the same pattern as iOS was adopted
in the Android repo.

To reinforce the idea that this check is out of place, notice that
WooCommerce Android does not implement the check. _Of course, it could
be that WooCommerce is wrong, but lacking code to update `strings.xml`
as part of the code freeze process, that explanation is not satisfying._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants