Skip to content

Replace Dependabot reviewers config with CODEOWNERS #21864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2025

Conversation

twstokes
Copy link
Contributor

@twstokes twstokes commented May 8, 2025

Description

Removes the reviewers configuration of Dependabot and replaces it with CODEOWNERS. See: https://github.blog/changelog/2025-04-29-dependabot-reviewers-configuration-option-being-replaced-by-code-owners/

Testing

  • Confirm that GitHub validates the CODEOWNERS file.

@twstokes twstokes requested review from a team and adalpari and removed request for a team May 8, 2025 18:31
@twstokes twstokes marked this pull request as ready for review May 8, 2025 18:31
@twstokes twstokes requested a review from a team May 8, 2025 18:32
@twstokes twstokes added this to the Future milestone May 8, 2025
@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 8, 2025

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21864-bcaeae1
Commitbcaeae1
Direct Downloadwordpress-prototype-build-pr21864-bcaeae1.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 8, 2025

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21864-bcaeae1
Commitbcaeae1
Direct Downloadjetpack-prototype-build-pr21864-bcaeae1.apk
Note: Google Login is not supported on these builds.

Copy link
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

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

👋 @twstokes and thanks for this change, I am request changes as I think the syntax is incomplete, plus we might want to restrict this automation to a specific file. 🤔

Let me know what you think! 🙏

@@ -0,0 +1 @@
@wordpress-mobile/android-developers
Copy link
Contributor

Choose a reason for hiding this comment

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

Blocker (🚫): I think that this would not work as expected for the below reasons:

  1. The correct syntax expects a file location parameter first, or a * regex if this would mean all changes within the project:
  2. To (somehow) replicate assigning @wordpress-mobile/android-developers for Dependabot (:dependabot:) PRs only, and not all changes, I recommend using this configuration instead (with an associated comment):
# Dependabot
/gradle/libs.versions.toml @wordpress-mobile/android-developers

FYI: Note that the above change will also assign @wordpress-mobile/android-developers to such changes, even if they don't come through Dependabot (:dependabot:) as you cannot restrict CODEOWNERS to only Dependabot (:dependabot:) PRs; any PR (manual or automated) touching this file will trigger reviewer assignment.

PS: You could check a random Dependabot (:dependabot:) PR to understand why we target gradle/libs.versions.toml.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cc @wordpress-mobile/android-developers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review @ParaskP7! I definitely missed the asterisk when reading their docs.

PRs only, and not all changes

Yep that's a good point.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the change @twstokes ! 🚀

I am very curious why this is shown as a bug when looking at the file changes, hmmm... 🤔

image

Unknown owner on line 2: make sure the team @wordpress-mobile/android-developers exists, is publicly visible, and has write access to the repository
/gradle/libs.versions.toml @wordpress-mobile/android-developers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same @ParaskP7. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep:

For CODEOWNERS:

The people you choose as code owners must have write permissions for the repository.

For Dependabot reviewers:

Reviewers must have at least read access to the repository.

So this isn't as 1:1 as originally thought.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ParaskP7 I think the solution here is to bump up the access of that (currently) two-person team since they are the devs that work directly on this app: https://github.com/orgs/wordpress-mobile/teams/android-developers

Copy link
Contributor Author

@twstokes twstokes May 9, 2025

Choose a reason for hiding this comment

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

I think the only reason they haven't hit blockers is because they are also members of a broader group that has higher access.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've bumped them to the Maintain role and the CODEOWNERS check is now green.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed to all, awesome, thanks @twstokes ! 🙇 ❤️ 🚀

@twstokes twstokes force-pushed the tooling/dependabot-reviewers branch from 0221954 to 8b24f8e Compare May 9, 2025 11:52
Copy link

sonarqubecloud bot commented May 9, 2025

@twstokes twstokes merged commit d9160f3 into trunk May 9, 2025
26 checks passed
@twstokes twstokes deleted the tooling/dependabot-reviewers branch May 9, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants