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

feat(appset): add key title to PR generator (#16447) #17907

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ggjulio
Copy link

@ggjulio ggjulio commented Apr 20, 2024

Closes #16447

Change

Add a new key title for all SCMaaS providers on generator pullRequest.

Why

Adding the title allow to filter PRs by title.
Which is a must for SCMaaS like bitbucket that do not support labels.
(branch filtering is not an alternative to labels because branch names are "immutable")

Example (see crenshaw-dev's comment #16447 (comment) ):

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: preview
  namespace: argocd
spec:
  goTemplate: true
  goTemplateOptions: ["missingkey=error"]
  generators:
  - matrix:
      generators:
      - pullRequest:
            bitbucketServer:
              project: project-name
              repo: repo-name
              api: https://bitbucket.example.com
              basicAuth:
                // ...
       - list:
            elements:
            - titleMatches: '{{ regexMatch ".*[PREVIEW].*" .title }}'
    selector:
      matchLabels:
       titleMatches: "true"
template:
  // ...

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

@ggjulio ggjulio force-pushed the appset-add-pr-title branch 7 times, most recently from bbdcd1e to bcaab7a Compare April 21, 2024 09:06
@ggjulio ggjulio marked this pull request as ready for review April 21, 2024 10:04
@ggjulio ggjulio requested review from a team as code owners April 21, 2024 10:04
@ggjulio ggjulio changed the title feat(appset): add title key to PR generator (#16447) feat(appset): add key title to PR generator (#16447) Apr 22, 2024
Signed-off-by: ggjulio <juligonz@student.42.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(appset) Filtering by title on Pull Request generator
1 participant