Closed krancour closed 2 years ago
Hello @krancour , I would like to work on this! . Can I know more context about this?
@karnatisrinivas if you take a look at how the value of the --project
flag in the CLI's event list
command gets passed through the SDK to the API server, you'll easily learn how to do the same for the event source.
On the backend, look at the EventEndpoints
to see how it picks that information out of the request and adds it to a selector object. Again, use the same approach.
The final modification would be in the DB query. There's a criteria object that would need to be conditionally modified if a source was specified. Again, just follow how it was done for the project filter.
Hello @krancour , https://github.com/brigadecore/brigade/blob/main/v2/cli/event_commands.go https://github.com/brigadecore/brigade/blob/main/v2/apiserver/internal/api/rest/events_endpoints.go
Based on your comments, I think above are the files you are pointing to. If not would you please point out the folder where the edit is required?
Those plus sdk/v3/events.go
and v2/apiserver/internal/mongodb/events.go
Can I work on this issue if anyone is currently not working on it?
@a-muk I didn't formally assign this to @karnatisrinivas, but since he asked some questions about it, let's find out from him if he has any work-in-progress here.
If he doesn't, then I would be happy to assign to you.
no issues @krancour
Hello @a-muk and @krancour ,
I haven't worked on this yet and I am still processing the code base. I have no issues if @a-muk wants work on this!
Thanks
Thanks for being such a team player @karnatisrinivas! There will be plenty more issues for everyone!
@a-muk I am assigning to you as requested. It's all yous!
@krancour I am currently unassigning myself from this issue. I went through the code base, but as a beginner I think the issue is becoming a bit tough for me to solve.
Looking at this closer, it seems everything is already in place except for the flag in the CLI.
Similar to how we can already filter by project.