-
Notifications
You must be signed in to change notification settings - Fork 21
feat: Add workflow to auto-label workspace PRs #1400
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
base: main
Are you sure you want to change the base?
Conversation
- Labels: workspace-update, workspace-addition, outside-workspaces, mandatory-workspace - Detects required plugins from downstream-plugins file - Runs daily at 6 AM UTC Assisted-by: Cursor
PR action ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic that distinguishes between workspace addition and workspace modification might need some rework.
const LABELS = { | ||
UPDATE: 'workspace-update', | ||
ADDITION: 'workspace-addition', | ||
OUTSIDE: 'outside-workspaces', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a fan of the 'outside-workspaces' name.
|
||
// Check if this is a new workspace | ||
if (file.status === 'added') { | ||
addedWorkspaces.add(workspace); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this test sufficient to know that it is the addition of a full workspace that didn't exist before ?
What happens if the PR only add a new file to an already-existing workspace (like a patch file in the /patches
sub-folder) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, I think we should also add another label related to the branch the PR is based on.
So we should also do the following changes:
- Add the
mandatory-workspace
label only if the PR is based on the main branch - Add a release-branch-patch label on workspace PRs based on a release branch
Assisted-by: Cursor
Assisted-by: Cursor