code: func getBugLink(c *router.Context, b *buildbucketpb.Build) (string, error) {
  	project, err := common.GetProject(c.Context, b.Builder.GetProject())
  	if err != nil || proto.Equal(&project.BuildBugTemplate, &config.BugTemplate{}) {
  		return "", err
  	}
  
  	builderPath := fmt.Sprintf("/p/%s/builders/%s/%s", b.Builder.GetProject(), b.Builder.GetBucket(), b.Builder.GetBuilder())
  	buildURL, err := c.Request.URL.Parse(builderPath + "/" + c.Params.ByName("numberOrId"))
  	if err != nil {
  		return "", errors.Annotate(err, "Unable to make build URL for build bug link.").Err()
  	}
  	builderURL, err := c.Request.URL.Parse(builderPath)
  	if err != nil {
  		return "", errors.Annotate(err, "Unable to make builder URL for build bug link.").Err()
  	}
  
  	return MakeBuildBugLink(&project.BuildBugTemplate, map[string]interface{}{
  		"Build":          b,
  		"MiloBuildUrl":   buildURL,
  		"MiloBuilderUrl": builderURL,
  	})
  }
docs: // getBugLink attempts to formulate and return the build page bug link
  // for the given build.