// getScriptsURL finds a scripts url label in the image metadata
551112
func getScriptsURL(image *api.Image) string {
	if image == nil {
		return ""
	}
	scriptsURL := getLabel(image, constants.ScriptsURLLabel)

	// For backward compatibility, support the old label schema
	if len(scriptsURL) == 0 {
		scriptsURL = getLabel(image, constants.DeprecatedScriptsURLLabel)
		if len(scriptsURL) > 0 {
			glog.V(0).Infof("warning: Image %s uses deprecated label '%s', please migrate it to %s instead!",
				image.ID, constants.DeprecatedScriptsURLLabel, constants.ScriptsURLLabel)
		}
	}
	if len(scriptsURL) == 0 {
		scriptsURL = getVariable(image, constants.ScriptsURLEnvironment)
		if len(scriptsURL) != 0 {
			glog.V(0).Infof("warning: Image %s uses deprecated environment variable %s, please migrate it to %s label instead!",
				image.ID, constants.ScriptsURLEnvironment, constants.ScriptsURLLabel)
		}
	}
	if len(scriptsURL) == 0 {
		glog.V(0).Infof("warning: Image %s does not contain a value for the %s label", image.ID, constants.ScriptsURLLabel)
	} else {
		glog.V(2).Infof("Image %s contains %s set to %q", image.ID, constants.ScriptsURLLabel, scriptsURL)
	}

	return scriptsURL
}
678413
func (r *Repository) GetLabelsURL() string {
	if r == nil || r.LabelsURL == nil {
		return ""
	}
	return *r.LabelsURL
}
818490
func (u *UserLDAPMapping) GetSubscriptionsURL() string {
	if u == nil || u.SubscriptionsURL == nil {
		return ""
	}
	return *u.SubscriptionsURL
}
331870
func (obj *Doc) GetScriptBreakpointsRaw(ctx context.Context) (json.RawMessage, error) {
	result := &struct {
		Breakpoints json.RawMessage	`json:"qBreakpoints"`
	} {}
	err := obj.rpc(ctx, "GetScriptBreakpoints", result)
	return result.Breakpoints, err 
}
249530
func NewGetScriptSourceArgs(scriptID runtime.ScriptID) *GetScriptSourceArgs {
	args := new(GetScriptSourceArgs)
	args.ScriptID = scriptID
	return args
}
278202
func (r *RepositoryRelease) GetHTMLURL() string {
	if r == nil || r.HTMLURL == nil {
		return ""
	}
	return *r.HTMLURL
}
762636
func (r *RepositoryRelease) GetAssetsURL() string {
	if r == nil || r.AssetsURL == nil {
		return ""
	}
	return *r.AssetsURL
}
878333
func scriptDir() (string, error) {
	p, err := filepath.Abs(os.Args[0])
	if err != nil {
		return "", err
	}
	return filepath.Dir(p), nil
}
685095
func (r *Repository) GetBlobsURL() string {
	if r == nil || r.BlobsURL == nil {
		return ""
	}
	return *r.BlobsURL
}
65794
func (obj *Doc) GetScriptExRaw(ctx context.Context) (json.RawMessage, error) {
	result := &struct {
		Script json.RawMessage	`json:"qScript"`
	} {}
	err := obj.rpc(ctx, "GetScriptEx", result)
	return result.Script, err 
}
1061221
func (u *UserLDAPMapping) GetStarredURL() string {
	if u == nil || u.StarredURL == nil {
		return ""
	}
	return *u.StarredURL
}
1231832
func (c *Contributor) GetGistsURL() string {
	if c == nil || c.GistsURL == nil {
		return ""
	}
	return *c.GistsURL
}
785492
func (r *Repository) GetCommitsURL() string {
	if r == nil || r.CommitsURL == nil {
		return ""
	}
	return *r.CommitsURL
}
1201273
func GetAbsURL(req *http.Request) url.URL {
	var result url.URL

	if req.URL.IsAbs() {
		return *req.URL
	}

	if domain := req.Header.Get("Origin"); domain != "" {
		parseResult, _ := url.Parse(domain)
		result = *parseResult
	}

	result.Parse(req.RequestURI)
	return result
}
644793
func (c *CheckRunImage) GetImageURL() string {
	if c == nil || c.ImageURL == nil {
		return ""
	}
	return *c.ImageURL
}
880285
func (obj *Doc) GetScript(ctx context.Context) (string, error) {
	result := &struct {
		Script string	`json:"qScript"`
	} {}
	err := obj.rpc(ctx, "GetScript", result)
	return result.Script, err 
}
969508
func (i *Installation) GetAccessTokensURL() string {
	if i == nil || i.AccessTokensURL == nil {
		return ""
	}
	return *i.AccessTokensURL
}