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: add support for schedules #446

Merged
merged 7 commits into from
Jun 5, 2023
Merged

feat: add support for schedules #446

merged 7 commits into from
Jun 5, 2023

Conversation

jbrockopp
Copy link
Contributor

@jbrockopp jbrockopp commented May 5, 2023

xref: go-vela/community#538

Part of go-vela/community#772

Dependent on go-vela/sdk-go#233 and go-vela/worker#479

This adds a set of schedule based commands to support the new /api/v1/schedules endpoints:

vela add schedule --org <org> --repo <repo> --schedule <name> --entry <entry>
vela get schedule --org <org> --repo <repo>
vela view schedule --org <org> --repo <repo> --schedule <name>
vela update schedule --org <org> --repo <repo> --schedule <name> --entry <entry>
vela remove schedule --org <org> --repo <repo> --schedule <name>

@jbrockopp jbrockopp added the feature Indicates a new feature label May 5, 2023
@jbrockopp jbrockopp self-assigned this May 5, 2023
@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Merging #446 (d58ba43) into main (b023c3b) will increase coverage by 0.70%.
The diff coverage is 95.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #446      +/-   ##
==========================================
+ Coverage   85.79%   86.49%   +0.70%     
==========================================
  Files         133      145      +12     
  Lines        5829     6288     +459     
==========================================
+ Hits         5001     5439     +438     
- Misses        680      694      +14     
- Partials      148      155       +7     
Impacted Files Coverage Δ
command/schedule/remove.go 88.46% <88.46%> (ø)
command/schedule/view.go 88.46% <88.46%> (ø)
command/schedule/get.go 88.88% <88.88%> (ø)
command/schedule/add.go 89.28% <89.28%> (ø)
command/schedule/update.go 89.28% <89.28%> (ø)
action/schedule/add.go 93.33% <93.33%> (ø)
action/schedule/get.go 93.61% <93.61%> (ø)
action/schedule/remove.go 100.00% <100.00%> (ø)
action/schedule/table.go 100.00% <100.00%> (ø)
action/schedule/update.go 100.00% <100.00%> (ø)
... and 2 more

@jbrockopp jbrockopp marked this pull request as ready for review May 26, 2023 16:15
@jbrockopp jbrockopp requested a review from a team as a code owner May 26, 2023 16:15
wass3rw3rk
wass3rw3rk previously approved these changes May 30, 2023
Copy link
Member

@wass3rw3rk wass3rw3rk left a comment

Choose a reason for hiding this comment

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

lgtm - minor note on some comment language that we probably want to tweak

cmd/vela-cli/view.go Outdated Show resolved Hide resolved
JordanSussman
JordanSussman previously approved these changes May 31, 2023
@jbrockopp jbrockopp dismissed stale reviews from JordanSussman and wass3rw3rk via 5939369 June 2, 2023 16:11
command/schedule/view.go Show resolved Hide resolved
action/schedule/remove.go Outdated Show resolved Hide resolved
JordanSussman
JordanSussman previously approved these changes Jun 2, 2023
wass3rw3rk
wass3rw3rk previously approved these changes Jun 5, 2023
JordanSussman
JordanSussman previously approved these changes Jun 5, 2023
Copy link
Contributor

@plyr4 plyr4 left a comment

Choose a reason for hiding this comment

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

nice, just a couple minor tweaks

action/schedule/get_test.go Outdated Show resolved Hide resolved
action/schedule/get_test.go Outdated Show resolved Hide resolved
action/schedule/remove_test.go Outdated Show resolved Hide resolved
action/schedule/update_test.go Outdated Show resolved Hide resolved
action/schedule/view_test.go Outdated Show resolved Hide resolved
@jbrockopp jbrockopp dismissed stale reviews from JordanSussman and wass3rw3rk via d58ba43 June 5, 2023 20:52
@wass3rw3rk wass3rw3rk merged commit e8cf14b into main Jun 5, 2023
@wass3rw3rk wass3rw3rk deleted the feature/schedule branch June 5, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Indicates a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants