Commit f284f086 authored by Steve Norman's avatar Steve Norman Committed by Sander van Harmelen

Added ForkParent struct to show details of a project if it is a fork. (#168)

If a project is a fork it will show the details of the project that
it was forked from.

If a project isn't a fork the setting will be null.
parent 3b48c44f
......@@ -74,6 +74,7 @@ type Project struct {
OnlyAllowMergeIfAllDiscussionsAreResolved bool `json:"only_allow_merge_if_all_discussions_are_resolved"`
LFSEnabled bool `json:"lfs_enabled"`
RequestAccessEnabled bool `json:"request_access_enabled"`
ForkedFromProject *ForkParent `json:"forked_from_project"`
SharedWithGroups []struct {
GroupID int `json:"group_id"`
GroupName string `json:"group_name"`
......@@ -143,6 +144,17 @@ type GroupAccess struct {
NotificationLevel NotificationLevelValue `json:"notification_level"`
}
// ForkParent represents the parent project when this is a fork.
type ForkParent struct {
HTTPURLToRepo string `json:"http_url_to_repo"`
ID int `json:"id"`
Name string `json:"name"`
NameWithNamespace string `json:"name_with_namespace"`
Path string `json:"path"`
PathWithNamespace string `json:"path_with_namespace"`
WebURL string `json:"web_url"`
}
func (s Project) String() string {
return Stringify(s)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment