Documentation
¶
Index ¶
- type AccessLevel
- type AssignmentConfig
- func (cfg *AssignmentConfig) RepoBaseName() string
- func (cfg *AssignmentConfig) RepoNameForGroup(group *Group) string
- func (cfg *AssignmentConfig) RepoNameForStudent(student *Student) string
- func (cfg *AssignmentConfig) RepoNameWithSuffix(suffix string) string
- func (cfg *AssignmentConfig) RepoSuffix(student *Student) string
- func (cfg *AssignmentConfig) SetAccessLevel(level string)
- func (cfg *AssignmentConfig) SetBranch(branch string)
- func (cfg *AssignmentConfig) SetForce()
- func (cfg *AssignmentConfig) SetLocalpath(localpath string)
- func (cfg *AssignmentConfig) SetProtectToBranch(branch string)
- func (cfg *AssignmentConfig) Show()
- func (cfg *AssignmentConfig) Urls(assignment bool)
- type Clone
- type CourseConfig
- type Group
- type MergeMethod
- type MergeRequest
- type Per
- type Release
- type ReleaseMergeRequest
- type Seeder
- type SquashOption
- type Startercode
- type Student
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessLevel ¶
type AccessLevel int
const ( Guest AccessLevel = 10 Reporter AccessLevel = 20 Developer AccessLevel = 30 Maintainer AccessLevel = 40 )
func (AccessLevel) String ¶ added in v0.7.0
func (ac AccessLevel) String() string
type AssignmentConfig ¶
type AssignmentConfig struct {
Course string
Name string
UseCoursenameAsPrefix bool
Path string
URL string
Per Per
Description string
ContainerRegistry bool
AccessLevel AccessLevel
MergeRequest *MergeRequest
Students []*Student
Groups []*Group
Startercode *Startercode
Clone *Clone
Release *Release
Seeder *Seeder
}
func GetAssignmentConfig ¶
func GetAssignmentConfig(course, assignment string, onlyForStudentsOrGroups ...string) *AssignmentConfig
func (*AssignmentConfig) RepoBaseName ¶ added in v0.28.0
func (cfg *AssignmentConfig) RepoBaseName() string
func (*AssignmentConfig) RepoNameForGroup ¶ added in v0.28.0
func (cfg *AssignmentConfig) RepoNameForGroup(group *Group) string
func (*AssignmentConfig) RepoNameForStudent ¶ added in v0.28.0
func (cfg *AssignmentConfig) RepoNameForStudent(student *Student) string
func (*AssignmentConfig) RepoNameWithSuffix ¶ added in v0.28.0
func (cfg *AssignmentConfig) RepoNameWithSuffix(suffix string) string
func (*AssignmentConfig) RepoSuffix ¶ added in v0.17.0
func (cfg *AssignmentConfig) RepoSuffix(student *Student) string
Using email addresses instead of usernames/user-id's results in @ in the student's name. This is incompatible to the filesystem and gitlab so replacing the values is necessary.
func (*AssignmentConfig) SetAccessLevel ¶ added in v0.16.0
func (cfg *AssignmentConfig) SetAccessLevel(level string)
func (*AssignmentConfig) SetBranch ¶ added in v0.8.0
func (cfg *AssignmentConfig) SetBranch(branch string)
func (*AssignmentConfig) SetForce ¶ added in v0.10.0
func (cfg *AssignmentConfig) SetForce()
func (*AssignmentConfig) SetLocalpath ¶ added in v0.8.0
func (cfg *AssignmentConfig) SetLocalpath(localpath string)
func (*AssignmentConfig) SetProtectToBranch ¶ added in v0.18.2
func (cfg *AssignmentConfig) SetProtectToBranch(branch string)
func (*AssignmentConfig) Show ¶ added in v0.6.0
func (cfg *AssignmentConfig) Show()
func (*AssignmentConfig) Urls ¶ added in v0.23.0
func (cfg *AssignmentConfig) Urls(assignment bool)
type CourseConfig ¶
func GetCourseConfig ¶
func GetCourseConfig(course string) *CourseConfig
type MergeMethod ¶ added in v1.1.0
type MergeMethod string
MergeMethod represents the merge strategy for GitLab projects. Values correspond to glabs config format, not the GitLab API directly.
const ( // MergeCommit creates a merge commit for every merge (GitLab default). MergeCommit MergeMethod = "merge" // SemiLinearHistory requires linear history: rebase before creating merge commit. SemiLinearHistory MergeMethod = "semi_linear" // FastForward only allows fast-forward merges; no merge commits. FastForward MergeMethod = "ff" )
type MergeRequest ¶ added in v0.18.1
type MergeRequest struct {
MergeMethod MergeMethod
SquashOption SquashOption
PipelineMustSucceed bool
SkippedPipelinesAreSuccessful bool
AllThreadsMustBeResolved bool
StatusChecksMustSucceed bool
}
type Release ¶ added in v0.18.1
type Release struct {
MergeRequest *ReleaseMergeRequest
DockerImages []string
}
type ReleaseMergeRequest ¶ added in v1.1.0
type SquashOption ¶ added in v1.2.0
type SquashOption string
SquashOption represents the squash-on-merge setting for GitLab projects.
const ( // SquashNever disables squashing for all merge requests. SquashNever SquashOption = "never" // SquashAlways squashes all merge requests automatically. SquashAlways SquashOption = "always" // SquashDefaultOff lets users opt in to squash per MR (default off). SquashDefaultOff SquashOption = "default_off" // SquashDefaultOn lets users opt out of squash per MR (default on). SquashDefaultOn SquashOption = "default_on" )
type Startercode ¶
Click to show internal directories.
Click to hide internal directories.