@@ -1228,7 +1228,7 @@ func NewIssuePost(ctx *context.Context) {
1228
1228
}
1229
1229
}
1230
1230
1231
- // roleDescriptor returns the Role Descriptor for a comment in/with the given repo, poster and issue
1231
+ // roleDescriptor returns the role descriptor for a comment in/with the given repo, poster and issue
1232
1232
func roleDescriptor (ctx stdCtx.Context , repo * repo_model.Repository , poster * user_model.User , issue * issues_model.Issue , hasOriginalAuthor bool ) (issues_model.RoleDescriptor , error ) {
1233
1233
roleDescriptor := issues_model.RoleDescriptor {}
1234
1234
@@ -1246,9 +1246,9 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
1246
1246
1247
1247
// Check if the poster is owner of the repo.
1248
1248
if perm .IsOwner () {
1249
- // If the poster isn't a admin, enable the owner role.
1249
+ // If the poster isn't an admin, enable the owner role.
1250
1250
if ! poster .IsAdmin {
1251
- roleDescriptor .Role = issues_model .RoleDescriptorOwner
1251
+ roleDescriptor .RoleInRepo = issues_model .RoleRepoOwner
1252
1252
return roleDescriptor , nil
1253
1253
}
1254
1254
@@ -1258,7 +1258,7 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
1258
1258
return roleDescriptor , err
1259
1259
}
1260
1260
if ok {
1261
- roleDescriptor .Role = issues_model .RoleDescriptorOwner
1261
+ roleDescriptor .RoleInRepo = issues_model .RoleRepoOwner
1262
1262
return roleDescriptor , nil
1263
1263
}
1264
1264
}
@@ -1271,7 +1271,7 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
1271
1271
if isMember , err := organization .IsOrganizationMember (ctx , repo .Owner .ID , poster .ID ); err != nil {
1272
1272
return roleDescriptor , err
1273
1273
} else if isMember {
1274
- roleDescriptor .Role = issues_model .RoleDescriptorMember
1274
+ roleDescriptor .RoleInRepo = issues_model .RoleRepoMember
1275
1275
return roleDescriptor , nil
1276
1276
}
1277
1277
}
@@ -1280,7 +1280,7 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
1280
1280
if isCollaborator , err := repo_model .IsCollaborator (ctx , repo .ID , poster .ID ); err != nil {
1281
1281
return roleDescriptor , err
1282
1282
} else if isCollaborator {
1283
- roleDescriptor .Role = issues_model .RoleDescriptorCollaborator
1283
+ roleDescriptor .RoleInRepo = issues_model .RoleRepoCollaborator
1284
1284
return roleDescriptor , nil
1285
1285
}
1286
1286
@@ -1298,10 +1298,10 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
1298
1298
if _ , total , err := issue_indexer .SearchIssues (ctx , searchOpt ); err != nil {
1299
1299
return roleDescriptor , err
1300
1300
} else if total > 0 {
1301
- roleDescriptor .Role = issues_model .RoleDescriptorContributor
1301
+ roleDescriptor .RoleInRepo = issues_model .RoleRepoContributor
1302
1302
} else if total == 0 && issue .IsPull && ! issue .IsClosed {
1303
1303
// only display first time contributor in the first opening pull request
1304
- roleDescriptor .Role = issues_model .RoleDescriptorFirstTimeContributor
1304
+ roleDescriptor .RoleInRepo = issues_model .RoleRepoFirstTimeContributor
1305
1305
}
1306
1306
1307
1307
return roleDescriptor , nil
0 commit comments