Add campaigns tool#56
Merged
wesleyjellis merged 2 commits intomainfrom Jun 13, 2025
Merged
Conversation
Expose campaigns (without checks) as a new tool. Default filter only shows in progress campaigns
Contributor
derek-etherton-opslevel
left a comment
There was a problem hiding this comment.
we'll need to push in the opslevel-go changes first and then update submodules, but lgtm!
rocktavious
reviewed
Jun 13, 2025
Comment on lines
+569
to
+589
| if node.Owner != (opslevel.TeamId{}) { | ||
| c.Owner = &node.Owner | ||
| } | ||
| if node.StartDate != (iso8601.Time{}) { | ||
| c.StartDate = &node.StartDate | ||
| } | ||
| if node.EndedDate != (iso8601.Time{}) { | ||
| c.EndedDate = &node.EndedDate | ||
| } | ||
| if node.TargetDate != (iso8601.Time{}) { | ||
| c.TargetDate = &node.TargetDate | ||
| } | ||
| if len(node.Reminder.Channels) > 0 { | ||
| c.Reminder = &node.Reminder | ||
| } | ||
| if node.Filter != (opslevel.FilterId{}) { | ||
| c.Filter = &node.Filter | ||
| } | ||
| if node.CheckStats != (opslevel.Stats{}) { | ||
| c.CheckStats = node.CheckStats | ||
| } |
Contributor
There was a problem hiding this comment.
I've never seen syntax like this before - TIL
Contributor
Author
There was a problem hiding this comment.
Maybe not very golike but I don't know how else to see if the value is the same as the default constructor
Contributor
There was a problem hiding this comment.
@wesleyjellis no it makes sense in this usecase i've just never seen it before. Its verbose for sure but understandable. 👍
derek-etherton-opslevel
approved these changes
Jun 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose campaigns (without checks) as a new tool. Default filter only shows in progress campaigns
Problem
Users of the mcp server can't see what campaigns exist in opslevel
Solution
Add a tool to list campaigns in opslevel!
Doesn't include a way to see campaigns for a particular service and it doesn't show the details of the checks yet
Checklist