Skip to content
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

Update required-review config #29318

Closed
wants to merge 2 commits into from
Closed

Conversation

anomiex
Copy link
Contributor

@anomiex anomiex commented Mar 6, 2023

Proposed changes:

This makes the following changes:

  • Taking advantage of the new consume option to DRY things out.
  • Allow everyone to update composer.lock and changelog/* in all projects, not only plugins.
  • Fix Required Review: Allow anyone who can approve to also approve docs #28359, as written the "Monorepo itself" rule still applied to docs so only jetpack-approvers were actually allowed. This is done by leaving docs/** in the rule with consume set an moving "Monorepo itself" after.
  • The "Jetpack and packages" rule now only covers Jetpack. A second rule covers those packages (and now js-packages too) that are maintained by Ground Control. All other packages are left to team rules or the catch-all at the end, so we don't have to exclude them anymore.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

No

Testing instructions:

In the monorepo we have a bunch of projects owned by different teams.
Everyone should be able to update lock files and changelog entries,
which means that the rules for each team's projects has to exclude those
files so only the "anyone can update these files" rule applies.

This adds a new rule option, `consume`. When set on a rule, any paths
matching the rule will be ignored for all later rules in the file. This
will allow us to not have to repeat these exclusions everywhere.
This makes the following changes:

* Taking advantage of the new `consume` option to DRY things out.
* Allow everyone to update `composer.lock` and `changelog/*` in all
  projects, not only plugins.
* Fix #28359, as written the "Monorepo itself" rule still applied to
  docs so only jetpack-approvers were actually allowed. This is done by
  leaving `docs/**` in the rule with `consume` set an moving "Monorepo
  itself" after.
* The "Jetpack and packages" rule now only covers Jetpack. A second rule
  covers those packages (and now js-packages too) that are maintained by
  Ground Control. All other packages are left to team rules or the
  catch-all at the end, so we don't have to exclude them anymore.
@anomiex anomiex added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Pri] Normal DO NOT MERGE don't merge it! labels Mar 6, 2023
@anomiex anomiex self-assigned this Mar 6, 2023
@anomiex anomiex mentioned this pull request Mar 6, 2023
3 tasks
@github-actions github-actions bot added the Actions GitHub actions used to automate some of the work around releases and repository management label Mar 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.

@kraftbj
Copy link
Contributor

kraftbj commented Mar 6, 2023

I think the list is capitalization sensitive, but afaik, GH user names are unique without regard to capitalization. While you're in there, is that something you could look at? #29320

@anomiex
Copy link
Contributor Author

anomiex commented Mar 6, 2023

I think the list is capitalization sensitive, but afaik, GH user names are unique without regard to capitalization. While you're in there, is that something you could look at? #29320

Sure, but not on this PR.

Comment on lines +28 to +51
# Jetpack Approvers review the Jetpack plugin.
- name: Jetpack-the-plugin
paths:
- 'projects/packages/**'
- 'projects/plugins/jetpack/**'
# Exclude packages managed by other teams, which are covered by other blocks below.
- '!projects/js-packages/image-guide/**'
- '!projects/js-packages/svelte-data-sync-client/**'
- '!projects/packages/wp-js-data-sync/**'
- '!projects/packages/backup/**'
- '!projects/packages/import/**'
- '!projects/packages/forms/**'
- '!projects/packages/search/**'
- '!projects/packages/stats/**'
- '!projects/packages/stats-admin/**'
- '!projects/packages/publicize/**'
- '!projects/packages/waf/**'
- '!projects/plugins/*/composer.lock'
- '!projects/plugins/*/composer.json'
- '!projects/plugins/*/changelog/*'
teams:
- jetpack-approvers

# Packages owned by Ground Control.
- name: Ground Control packages
paths:
- 'projects/js-packages/babel-plugin-replace-textdomain/**'
- 'projects/js-packages/eslint-changed/**'
- 'projects/js-packages/eslint-config-target-es/**'
- 'projects/js-packages/i18n-check-webpack-plugin/**'
- 'projects/js-packages/i18n-loader-webpack-plugin/**'
- 'projects/js-packages/remove-asset-webpack-plugin/**'
- 'projects/js-packages/webpack-config/**'
- 'projects/packages/autoloader/**'
- 'projects/packages/changelogger/**'
- 'projects/packages/codesniffer/**'
- 'projects/packages/ignorefile/**'
- 'projects/packages/phpcs-filter/**'
teams:
- jetpack-approvers
Copy link
Member

Choose a reason for hiding this comment

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

I do not fully understand that part. Given that the Approvers group already is the fallback, why do we need to add those specific use-cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need to, at least not now. OTOH, this clearly documents that these packages are specifically intended to be owned, and keeps them that way should we decide to change the default for some reason.

Base automatically changed from add/required-review-consume-option to trunk March 9, 2023 16:17
@anomiex anomiex removed the [Status] Needs Review To request a review from Crew. Label will be renamed soon. label Mar 10, 2023
@anomiex
Copy link
Contributor Author

anomiex commented Mar 10, 2023

This will need reconsideration after #29426. Possibly we won't need anything further here, but maybe some of the rearrangement will still make sense.

@anomiex anomiex closed this Jun 6, 2023
@anomiex anomiex deleted the update/required-review-config branch June 6, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Action] Required Review Actions GitHub actions used to automate some of the work around releases and repository management DO NOT MERGE don't merge it! [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants