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
Remove GitHub teams #1083
Remove GitHub teams #1083
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1083 +/- ##
==========================================
- Coverage 40.39% 40.33% -0.06%
==========================================
Files 110 110
Lines 9019 8896 -123
==========================================
- Hits 3643 3588 -55
+ Misses 5041 4975 -66
+ Partials 335 333 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
OrganizationID is not used other than in mock tests and is not necessary otherwise.
Old GroupOptions is no longer needed. Instead renamed TeamOptions to GroupOptions.
For assignments with autoapprove it may happen that students submit a solution that passes to both their student repo and their joint group repo, which caused the approval to be counted twice. This commit ignores submissions from a group repo on a non-group assignment to be approved, and thus won't be counted. Similarly, submissions from a student repo to a group assignment will also be ignored. This is mainly an issue for autoapprove assignments.
This avoids counting duplicate approvals for the same assignment. This should hopefully not be necessary for future courses when the database records avoids this due to the previous commit.
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.
Mostly minor stuff
@@ -55,7 +55,6 @@ message Group { | |||
uint64 ID = 1; | |||
string name = 2 [(go.field) = { tags: 'gorm:"uniqueIndex:group"' }]; | |||
uint64 courseID = 3 [(go.field) = { tags: 'gorm:"uniqueIndex:group"' }]; | |||
uint64 ScmTeamID = 4; |
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.
Will this be a problem for the database? Or can we just update the database table to ignore this attribute?
@@ -119,31 +117,19 @@ func (s *QuickFeedService) updateGroup(ctx context.Context, sc scm.SCM, request | |||
return fmt.Errorf("failed to get %s repository for group %q: %w", course.Code, group.Name, err) | |||
} | |||
if repo == nil { | |||
// no group repository exists; create new repository for group | |||
if request.Name != "" && newGroup.ScmTeamID < 1 { |
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.
Should we still check for request.Name != ""
and update newGroup.Name
as before?
We will get here only if repo == nil
meaning that there is no repo recorded in the database, and thus we haven't created it yet. Thus, we can still change the name according to the request
... Or perhaps I'm missing something?
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.
I don't think it's necessary as a similar check is being done in s.newGroup
.
Closes #1084.