-
Notifications
You must be signed in to change notification settings - Fork 149
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
GitHub Deployment - Allow Automerge configuration #193
GitHub Deployment - Allow Automerge configuration #193
Conversation
5795ac0
to
cabb356
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #193 +/- ##
==========================================
- Coverage 54.31% 54.25% -0.06%
==========================================
Files 35 35
Lines 3198 3205 +7
==========================================
+ Hits 1737 1739 +2
- Misses 1208 1211 +3
- Partials 253 255 +2
☔ View full report in Codecov by Sentry. |
ae39a91
to
16d940d
Compare
|
16d940d
to
f747cf7
Compare
@mikesplain is it ready for review? |
f747cf7
to
913c9a2
Compare
@pasha-codefresh Yes It is, thank you! Just finished a second round of testing. |
``` | ||
|
||
**Notes**: | ||
- If the message is set to 140 characters or more, it will be truncated. | ||
- If `github.repoURLPath` and `github.revisionPath` are same as above, they can be omitted. | ||
- By default, github deployments utilize automerge to ensure the requested ref is up to date with the default branch. | ||
Setting this option to `false` is required if you would like to deploy older refs in your default branch. |
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.
Can we also mention that this parameter is optional and by default it is false, i would write opposite , like: Setting this option to true
is required ....
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.
Sorry for the delay I realized that you're right, this PR set the value to false by default however the upstream API is true by default. I had to modify the PR and language in the doc to reverse the behavior. I hope the language in the docs is more clear now. Thanks!
@mikesplain LGTM, just small comment about documentation |
I was just looking for this feature @mikesplain . Thanks for the PR. Are you still available to address the issues requested by the reviewers? |
Yes, found a bug and had to fix the code slightly. Tested it internally and it works fine just need to rebase. I'll update the PR tomorrow ASAP. |
3f034ec
to
b621a21
Compare
Signed-off-by: Mike Splain <[email protected]>
Signed-off-by: Mike Splain <[email protected]>
Signed-off-by: Mike Splain <[email protected]>
b621a21
to
898778a
Compare
@pasha-codefresh I apologize for the long delay, life gets in the way. This is ready for review again and has been rebased against master! After your comments I realized the PR worked properly if you set the new configuration however the default was false, rather than the Github default (and argocd notifications default, true), see https://docs.github.com/en/rest/deployments/deployments?apiVersion=2022-11-28#create-a-deployment for more details. I switched the use of pointers so we can check if the user has set the configuration and default it accordingly. I'm not sure if the project has a better way to handle this, I'm happy to amend with any suggestions. Thanks again |
Any news on this @pasha-codefresh ? |
Sorry, hadnt time to review, @carloscastrojumo @mikesplain , i will do it today / tomorrow |
LGTM, thank you |
Great thanks so much @pasha-codefresh! |
Thank you for great job :) you can open PR to argo-cd with notification-engine update, you can send it here, i will help with review |
* Allow AutoMerge configuration Signed-off-by: Mike Splain <[email protected]> * Add docs and test Signed-off-by: Mike Splain <[email protected]> * Fix default and docs Signed-off-by: Mike Splain <[email protected]> --------- Signed-off-by: Mike Splain <[email protected]> Co-authored-by: pasha-codefresh <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]>
… (#208) * fix: oncePer condition only checked when ` when` condition is true Signed-off-by: Anthony Mikhail <[email protected]> * wip Signed-off-by: Anthony Mikhail <[email protected]> * wip Signed-off-by: Anthony Mikhail <[email protected]> * wip Signed-off-by: Anthony Mikhail <[email protected]> * add debuging Signed-off-by: Anthony Mikhail <[email protected]> * wip Signed-off-by: Anthony Mikhail <[email protected]> * Revert "wip" This reverts commit 6313312. Signed-off-by: Anthony Mikhail <[email protected]> * wip Signed-off-by: Anthony Mikhail <[email protected]> * chore(deps): bump github.com/gregdel/pushover from 1.1.0 to 1.2.1 (#210) Bumps [github.com/gregdel/pushover](https://github.com/gregdel/pushover) from 1.1.0 to 1.2.1. - [Commits](gregdel/pushover@v1.1.0...v1.2.1) --- updated-dependencies: - dependency-name: github.com/gregdel/pushover dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Anthony Mikhail <[email protected]> * GitHub Deployment - Allow Automerge configuration (#193) * Allow AutoMerge configuration Signed-off-by: Mike Splain <[email protected]> * Add docs and test Signed-off-by: Mike Splain <[email protected]> * Fix default and docs Signed-off-by: Mike Splain <[email protected]> --------- Signed-off-by: Mike Splain <[email protected]> Co-authored-by: pasha-codefresh <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]> * Add GitHub Pull Request comments integration (#211) * Add pull request comment to github service Signed-off-by: bennesp <[email protected]> * Add github pull request comment templater test Signed-off-by: bennesp <[email protected]> * Add github pull request comment docs Signed-off-by: bennesp <[email protected]> --------- Signed-off-by: bennesp <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]> * chore(deps): bump codecov/codecov-action from 3 to 4 (#216) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Anthony Mikhail <[email protected]> * revert to v3 (#218) Signed-off-by: Anthony Mikhail <[email protected]> * Add CardsV2 Support to Google Chat (#201) Signed-off-by: Tom Paulus <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]> * chore(deps): bump expr version and golang as required by expr 1.15 (#221) * bump expr version Signed-off-by: zachaller <[email protected]> * upgrade go expr uses any Signed-off-by: zachaller <[email protected]> * use root go version Signed-off-by: zachaller <[email protected]> * add sum Signed-off-by: zachaller <[email protected]> * change for golang upgrade Signed-off-by: zachaller <[email protected]> --------- Signed-off-by: zachaller <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]> * wip Signed-off-by: Anthony Mikhail <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]> * fix duplicate when using self-service (#227) * fix duplicate when using self-service Signed-off-by: May Zhang <[email protected]> * fix duplicate when using self-service Signed-off-by: May Zhang <[email protected]> * fix tests Signed-off-by: May Zhang <[email protected]> * -s Signed-off-by: May Zhang <[email protected]> * add test cases Signed-off-by: May Zhang <[email protected]> * remove not used method Signed-off-by: May Zhang <[email protected]> --------- Signed-off-by: May Zhang <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]> * Spelling (#220) * spelling: available Signed-off-by: Josh Soref <[email protected]> * spelling: configuration Signed-off-by: Josh Soref <[email protected]> * spelling: emoji Signed-off-by: Josh Soref <[email protected]> * spelling: environment Signed-off-by: Josh Soref <[email protected]> * spelling: github Signed-off-by: Josh Soref <[email protected]> * spelling: notification Signed-off-by: Josh Soref <[email protected]> * spelling: overridden Signed-off-by: Josh Soref <[email protected]> * spelling: successfully Signed-off-by: Josh Soref <[email protected]> * spelling: unmarshal Signed-off-by: Josh Soref <[email protected]> * spelling: variable or Signed-off-by: Josh Soref <[email protected]> * spelling: variables are Signed-off-by: Josh Soref <[email protected]> * spelling: webhook Signed-off-by: Josh Soref <[email protected]> --------- Signed-off-by: Josh Soref <[email protected]> Co-authored-by: pasha-codefresh <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]> * Update documentation for Slack options (#209) * Clarify option types Signed-off-by: Andreas Lindhé <[email protected]> * Sort alphabetically Signed-off-by: Andreas Lindhé <[email protected]> * Add missing `channels` and `sigingSecret` options Signed-off-by: Andreas Lindhé <[email protected]> * Convert list to Markdown table Signed-off-by: Andreas Lindhé <[email protected]> * Clarify `token` description Signed-off-by: Andreas Lindhé <[email protected]> * Add example column Signed-off-by: Andreas Lindhé <[email protected]> * Populate rest of example fields Signed-off-by: Andreas Lindhé <[email protected]> * Fix typo Co-authored-by: Blake Pettersson <[email protected]> Signed-off-by: Andreas Lindhé <[email protected]> --------- Signed-off-by: Andreas Lindhé <[email protected]> Co-authored-by: Blake Pettersson <[email protected]> Co-authored-by: pasha-codefresh <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]> * fix: avoid crashing in gitHubService.Send when repoURL has no / (#219) Signed-off-by: Josh Soref <[email protected]> Co-authored-by: pasha-codefresh <[email protected]> Signed-off-by: Anthony Mikhail <[email protected]> --------- Signed-off-by: Anthony Mikhail <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Mike Splain <[email protected]> Signed-off-by: bennesp <[email protected]> Signed-off-by: Tom Paulus <[email protected]> Signed-off-by: zachaller <[email protected]> Signed-off-by: May Zhang <[email protected]> Signed-off-by: Josh Soref <[email protected]> Signed-off-by: Andreas Lindhé <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mike Splain <[email protected]> Co-authored-by: pasha-codefresh <[email protected]> Co-authored-by: Benedetto Nespoli <[email protected]> Co-authored-by: Tom Paulus <[email protected]> Co-authored-by: Zach Aller <[email protected]> Co-authored-by: May Zhang <[email protected]> Co-authored-by: Josh Soref <[email protected]> Co-authored-by: Andreas Lindhé <[email protected]> Co-authored-by: Blake Pettersson <[email protected]>
Hi there, thanks for adding support for Deployments to the Notifications Engine. I was testing out the support and ran into issues trying to deploy an older ref from the default branch. The notifications controller would report an error when merging the default branch into the commit referenced. Upon reading the docs, it looks like this is the intended behavior so it seems reasonable to allow users to disable this feature when they would not like their deployment updated against the default branch.
This PR was tested against an internal custom ArgoCD build and it resolved our issues with deployments only functioning on the latest commit in a default branch.
I'm happy to make any required changes, just let me know. Thanks!