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

Support label selectors In ApplicationSet Pull Request generator #12300

Open
mnacharov opened this issue Feb 6, 2023 · 4 comments
Open

Support label selectors In ApplicationSet Pull Request generator #12300

mnacharov opened this issue Feb 6, 2023 · 4 comments
Labels
component:applications-set Bulk application management related enhancement New feature or request

Comments

@mnacharov
Copy link

mnacharov commented Feb 6, 2023

Summary

Allow negative matching on pull request labels. Create applications for pull requests that doesn't have Stale label

Motivation

In most of my use-cases, PR stands are created by default to run some integration tests on them and/or preview changes as part of a code review. Therefore, I would like to have ability to stop those stands by labeling PR as Stale rather than by removing label preview from PR.

Proposal

Add notLabels in addition to labels filter in pullRequest generator. Filter the PRs to those not containing any of the labels listed

@mnacharov mnacharov added the enhancement New feature or request label Feb 6, 2023
@crenshaw-dev crenshaw-dev added the component:applications-set Bulk application management related label Feb 6, 2023
mnacharov added a commit to mnacharov/argo-cd that referenced this issue Feb 8, 2023
…#12300)

Signed-off-by: Mikhail Nacharov <mike.nacharov@gmail.com>
mnacharov added a commit to mnacharov/argo-cd that referenced this issue Feb 8, 2023
…#12300)

Signed-off-by: Mikhail Nacharov <mike.nacharov@gmail.com>
@mnacharov mnacharov changed the title Support exceptLabels In ApplicationSet Pull Request generator Support notLabels In ApplicationSet Pull Request generator Feb 8, 2023
@blakepettersson
Copy link
Member

Perhaps it could make sense to have matchExpressions, i.e something more akin to how Deployments et al does filtering?

@jessesuen
Copy link
Member

Create applications for pull requests that doesn't have Stale label

I've heard of similar request from users and agree with the use case.

Perhaps it could make sense to have matchExpressions

This seems like a more flexible way to achieve the use case. I like the proposal.

@blakepettersson blakepettersson changed the title Support notLabels In ApplicationSet Pull Request generator Support label selectors In ApplicationSet Pull Request generator Sep 25, 2023
@llavaud
Copy link

llavaud commented Dec 1, 2023

Perhaps it could make sense to have matchExpressions, i.e something more akin to how Deployments et al does filtering?

could be useful to also have support for wildcard or Contains operator !

@crenshaw-dev
Copy link
Collaborator

crenshaw-dev commented Dec 1, 2023

@llavaud I think you could achieve the same thing using go templates, the generator's values field, and the label selector: #16447 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:applications-set Bulk application management related enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants