-
Notifications
You must be signed in to change notification settings - Fork 2
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: Create a GitHub data source using the new Project structure #77
Conversation
Note: I did not yet write any tests for this, and I'm sure codecov is going to complain about that. I will get to that, but I wanted to get this code up since it's large and exciting! |
Codecov Report
@@ Coverage Diff @@
## main #77 +/- ##
==========================================
+ Coverage 56.22% 59.20% +2.98%
==========================================
Files 14 15 +1
Lines 635 733 +98
==========================================
+ Hits 357 434 +77
- Misses 272 289 +17
- Partials 6 10 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Niceee!
ghOrgLogin := env.GithubOrg | ||
slackToken := env.SlackAuthToken | ||
/**** | ||
* NOTE: This is working code at the moment, but will remain commented out |
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.
👍
) | ||
|
||
func TestCollectFindingsSingleProjectSingleFinding(t *testing.T) { | ||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
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.
This is so cool!
This is a follow-up to #75, and huge step toward enabling #43.
This converts the GitHub querying code to use the new
ProjectCollection
/Project
/Finding
data structures.I also included commented-out code in
internal/scan.go
that I used to prove this out. That is ultimately what will lead to the full enablement of #43.