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 target branch support pullrequestgenerator #13535

Conversation

Syst3m1cAn0maly
Copy link
Contributor

@Syst3m1cAn0maly Syst3m1cAn0maly commented May 10, 2023

Closes #13533

Support a target_branch template which retrieves the target branch of the Pull Request when using the PullRequestGenerator for AppSets.
Also add a target_branch_slug analog to branch_slug.

Add a targetBranchFilter to allow filtering of the Pull Request based on the target branch using a regex.
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.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • 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.

Please see Contribution FAQs if you have questions about your pull-request.

@Syst3m1cAn0maly Syst3m1cAn0maly changed the title Add target branch support pullrequestgenerator Add target branch support pullrequestgenerator issue 13533 May 10, 2023
@Syst3m1cAn0maly Syst3m1cAn0maly changed the title Add target branch support pullrequestgenerator issue 13533 feat: Add target branch support pullrequestgenerator May 10, 2023
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Patch coverage: 77.77% and project coverage change: +0.25 🎉

Comparison is base (5662367) 48.98% compared to head (c9668d4) 49.23%.

❗ Current head c9668d4 differs from pull request most recent head 852d54a. Consider uploading reports for the commit 852d54a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13535      +/-   ##
==========================================
+ Coverage   48.98%   49.23%   +0.25%     
==========================================
  Files         249      248       -1     
  Lines       43066    42844     -222     
==========================================
  Hits        21094    21094              
+ Misses      19864    19651     -213     
+ Partials     2108     2099       -9     
Impacted Files Coverage Δ
applicationset/services/pull_request/github.go 23.61% <0.00%> (-0.34%) ⬇️
.../apis/application/v1alpha1/applicationset_types.go 28.57% <ø> (ø)
applicationset/services/pull_request/utils.go 93.33% <62.50%> (-6.67%) ⬇️
applicationset/generators/pull_request.go 52.94% <100.00%> (+0.70%) ⬆️
...ationset/services/pull_request/bitbucket_server.go 100.00% <100.00%> (ø)
applicationset/services/pull_request/gitea.go 68.75% <100.00%> (+0.66%) ⬆️
applicationset/services/pull_request/gitlab.go 87.50% <100.00%> (+0.22%) ⬆️

... and 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Syst3m1cAn0maly Syst3m1cAn0maly changed the title feat: Add target branch support pullrequestgenerator feat(appset): Add target branch support pullrequestgenerator May 10, 2023
@Syst3m1cAn0maly Syst3m1cAn0maly marked this pull request as draft May 11, 2023 08:17
@Syst3m1cAn0maly Syst3m1cAn0maly force-pushed the add-target-branch-support-pullrequestgenerator branch 3 times, most recently from 937ad3c to dc641df Compare May 12, 2023 05:15
@Syst3m1cAn0maly Syst3m1cAn0maly marked this pull request as ready for review May 12, 2023 06:34
@Syst3m1cAn0maly Syst3m1cAn0maly force-pushed the add-target-branch-support-pullrequestgenerator branch 2 times, most recently from a83e51e to 8829dab Compare May 16, 2023 09:51
…lter TargetBranchFilter for AppSet PullRequestGenerator

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>
Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>
Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>
Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>
@Syst3m1cAn0maly Syst3m1cAn0maly force-pushed the add-target-branch-support-pullrequestgenerator branch from 8829dab to c9668d4 Compare May 17, 2023 09:10
Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

Thanks, @Syst3m1cAn0maly!

@crenshaw-dev crenshaw-dev enabled auto-merge (squash) May 28, 2023 00:48
…upport-pullrequestgenerator

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev merged commit 0994ec8 into argoproj:master May 28, 2023
@Syst3m1cAn0maly Syst3m1cAn0maly deleted the add-target-branch-support-pullrequestgenerator branch July 3, 2023 08:47
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
…j#13535)

* Add support for templates target_branch and target_branch_slug and filter TargetBranchFilter for AppSet PullRequestGenerator

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>

* Update PullRequestGenerator documentation

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>

* Adjust field number for the new TargetBranchFilter

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>

* Add generated api files, Fix e2e failing test

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>

---------

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
…j#13535)

* Add support for templates target_branch and target_branch_slug and filter TargetBranchFilter for AppSet PullRequestGenerator

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>

* Update PullRequestGenerator documentation

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>

* Adjust field number for the new TargetBranchFilter

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>

* Add generated api files, Fix e2e failing test

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>

---------

Signed-off-by: Syst3m1An0maly <mehdi.chtayti@gmail.com>
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.

Add target_branch template and targetBranchFilter to PullRequestGenerator
2 participants