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

Gardening: update conditions to include "[<plugin> Feature]" labels #40396

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Nov 29, 2024

Proposed changes:

Some of our standalone plugins do not use [Feature] labels ; they use [PluginName Feature] labels instead. Let's update our conditions to be happy with such labels as well.

This commit also makes the priority condition a bit more broad, so it is satisfied with both "[Pri]" and "[Priority]" labels.

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

  • N/A

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

  • No

Testing instructions:

This can only be tested in a fork, where you'll merge this branch into trunk, then create an issue with no content and the "[Priority] High", "[Type] Bug", and "[Boost Feature] Cloud CSS" labels. No commment prompting for labels should get posted.

Some of our standalone plugins do not use [Feature] labels ; they use [PluginName Feature] labels instead. Let's update our conditions to be happy with such labels as well.
This commit also makes the priority condition a bit more broad, so it is satisfied with both "[Pri]" and "[Priority]" labels.
@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] In Progress [Pri] Normal Actions GitHub actions used to automate some of the work around releases and repository management labels Nov 29, 2024
@jeherve jeherve self-assigned this Nov 29, 2024
@jeherve jeherve force-pushed the update/repo-gardening-label-type-catch branch from 45b079b to f68d7de Compare November 29, 2024 16:17
@jeherve jeherve changed the title Gardening: update conditions to include "[<plugin> Feature]" labels Some of our standalone plugins do not use [Feature] labels ; they use [PluginName Feature] labels instead. Let's update our conditions to be happy with such labels as well. This commit also makes the priority condition a bit more broad, so it is satisfied with both "[Pri]" and "[Priority]" labels. Gardening: update conditions to include "[<plugin> Feature]" labels Nov 29, 2024
@jeherve jeherve added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] In Progress labels Nov 29, 2024
@jeherve jeherve requested review from anomiex and a team and removed request for anomiex November 29, 2024 16:17
@github-actions github-actions bot added the [Action] Repo Gardening Github Action: manage PR and issues in your Open Source project label Nov 29, 2024
Copy link
Contributor

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.
  • ✅ 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.


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    • A. Team Review: add the "[Status] Needs Team Review" label
      • For most changes, including minor cross-team impacts.
      • Example: Updating a team-specific component or a small change to a shared library.
    • B. Crew Review: add the "[Status] Needs Review" label
      • For significant changes to core functionality.
      • Example: Major updates to a shared library or complex features.
    • C. Both: Start with Team, then request Crew
      • For complex changes or when you need extra confidence.
      • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

Still unsure? Reach out in #jetpack-developers for guidance!

@@ -152,9 +152,9 @@ async function triageIssues( payload, octokit ) {
const issueLabels = await aiLabeling( payload, octokit );

// At this point, if we still miss a [Type] label, a [Feature] label, or a [Pri] label, ask the author to add it.
const requiredLabelTypes = [ '[Type]', '[Feature', '[Pri]' ];
const requiredLabelTypes = [ /^\[Type\]/, /^\[Pri/, /^\[.*?Feature/ ];
Copy link
Contributor

@anomiex anomiex Dec 2, 2024

Choose a reason for hiding this comment

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

Did you intend to leave off the \] from [Pri]?

Also, it might be good to avoid potentially matching something like [Type] Feature Request.

Suggested change
const requiredLabelTypes = [ /^\[Type\]/, /^\[Pri/, /^\[.*?Feature/ ];
const requiredLabelTypes = [ /^\[Type\]/, /^\[Pri\]/, /^\[[^\]]*Feature/ ];

Copy link
Member Author

Choose a reason for hiding this comment

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

Did you intend to leave off the ] from [Pri]?

I did, yes, I figured it'd be useful so we can catch [Priority] for repos that don't use the shorthand.

it might be good to avoid potentially matching something like [Type] Feature Request.

Good point. Done in f0313eb

Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

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

Looks reasonable. Haven't tested though.

@jeherve jeherve merged commit 4583fe6 into trunk Dec 3, 2024
55 checks passed
@jeherve jeherve deleted the update/repo-gardening-label-type-catch branch December 3, 2024 10:59
@github-actions github-actions bot removed the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Dec 3, 2024
matticbot pushed a commit to Automattic/action-repo-gardening that referenced this pull request Dec 3, 2024
…#40396)

* Gardening: update conditions to include "[<plugin> Feature]" labels

Some of our standalone plugins do not use [Feature] labels ; they use [PluginName Feature] labels instead. Let's update our conditions to be happy with such labels as well.
This commit also makes the priority condition a bit more broad, so it is satisfied with both "[Pri]" and "[Priority]" labels.

* Avoid catching [Type] Feature request

See Automattic/jetpack#40396 (comment)

---------

Co-authored-by: Brad Jorsch <anomiex@users.noreply.github.com>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12138232773

Upstream-Ref: Automattic/jetpack@4583fe6
matticbot pushed a commit to Automattic/jetpack-storybook that referenced this pull request Dec 3, 2024
…#40396)

* Gardening: update conditions to include "[<plugin> Feature]" labels

Some of our standalone plugins do not use [Feature] labels ; they use [PluginName Feature] labels instead. Let's update our conditions to be happy with such labels as well.
This commit also makes the priority condition a bit more broad, so it is satisfied with both "[Pri]" and "[Priority]" labels.

* Avoid catching [Type] Feature request

See Automattic/jetpack#40396 (comment)

---------

Co-authored-by: Brad Jorsch <anomiex@users.noreply.github.com>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12138232773

Upstream-Ref: Automattic/jetpack@4583fe6
jeherve added a commit that referenced this pull request Dec 3, 2024
Just like in #40396, we want to allow the AI labeler to pull plugin-specific labels as well.
jeherve added a commit that referenced this pull request Dec 3, 2024
…40425)

* Repo Gardening > AI Labeling: allow plugin-specific feature labels

Just like in #40396, we want to allow the AI labeler to pull plugin-specific labels as well.

* Update prompt to support those new label types

* Try a stricter rule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Action] Repo Gardening Github Action: manage PR and issues in your Open Source project Actions GitHub actions used to automate some of the work around releases and repository management [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.

2 participants