// Delete a label for a repository
//
// https://developer.github.com/v3/issues/labels/#delete-a-label
495797
func (l *LabelsService) Delete(uri *Hyperlink, uriParams M) (success bool, result *Result) {
	url, err := ExpandWithDefault(uri, &RepoLabelsURL, uriParams)
	if err != nil {
		return false, &Result{Err: err}
	}

	result = l.client.delete(url, nil, nil)

	success = (result.Response.StatusCode == 204)
	return
}
1151204
func labeled(issue *github.Issue, label string) bool {
	for _, l := range issue.Labels {
		if *l.Name == label {
			return true
		}
	}
	return false
}
280659
func (m *Manager) DeleteClient(clientID, label string) (err error) {
	_, err = m.getClientsCollection().RemoveAll(bson.M{"clientid": clientID, "label": label})
	return
}
1297933
func (r *Repository) DeleteTag(name string) error {
	_, err := r.Tag(name)
	if err != nil {
		return err
	}

	return r.Storer.RemoveReference(plumbing.ReferenceName(path.Join("refs", "tags", name)))
}
348256
func Delete(c *context.APIContext) {
	owner, repo := parseOwnerAndRepo(c)
	if c.Written() {
		return
	}

	if owner.IsOrganization() && !owner.IsOwnedBy(c.User.ID) {
		c.Error(403, "", "Given user is not owner of organization.")
		return
	}

	if err := models.DeleteRepository(owner.ID, repo.ID); err != nil {
		c.Error(500, "DeleteRepository", err)
		return
	}

	log.Trace("Repository deleted: %s/%s", owner.Name, repo.Name)
	c.Status(204)
}
536190
func (c *FakeCiliumNetworkPolicies) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewDeleteAction(ciliumnetworkpoliciesResource, c.ns, name), &v2.CiliumNetworkPolicy{})

	return err
}
692488
func (c *GitHubClient) DeleteRelease(ctx context.Context, releaseID int64) error {
	res, err := c.Repositories.DeleteRelease(context.TODO(), c.Owner, c.Repo, releaseID)
	if err != nil {
		return errors.Wrap(err, "failed to delete release")
	}

	if res.StatusCode != http.StatusNoContent {
		return errors.Errorf("delete release: invalid status: %s", res.Status)
	}

	return nil
}
450110
func (p *Profile) RemoveLabel(key string) {
	for _, sample := range p.Sample {
		delete(sample.Label, key)
	}
}
650890
func Delete(doc *utils.M) error {
	return db.Conn.Delete(db.AvailableTopicCollection, *doc)
}
512566
func (c *FakeCiliumEndpoints) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewDeleteAction(ciliumendpointsResource, c.ns, name), &v2.CiliumEndpoint{})

	return err
}
1131298
func (s *Service) DeleteLabel(ctx context.Context, id influxdb.ID) error {
	label, err := s.FindLabelByID(ctx, id)
	if label == nil && err != nil {
		return &influxdb.Error{
			Code: influxdb.ENotFound,
			Op:   OpPrefix + influxdb.OpDeleteLabel,
			Msg:  influxdb.ErrLabelNotFound,
		}
	}

	s.labelKV.Delete(id.String())
	return nil
}
626290
func ReleaseLabel(label string) {
	if len(label) != 0 {
		con := strings.SplitN(label, ":", 4)
		if len(con) > 3 {
			mcsDelete(con[3])
		}
	}
}
1161081
func (c *FakeFluxHelmReleases) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewDeleteAction(fluxhelmreleasesResource, c.ns, name), &v1alpha2.FluxHelmRelease{})

	return err
}
205335
func (k *Apk) Label(resConfig *androidbinary.ResTableConfig) (s string, err error) {
	s = k.getResource(k.manifest.App.Label, resConfig)
	if androidbinary.IsResID(s) {
		err = errors.New("unable to convert label-id to string")
	}
	return
}
1086415
func (issue *Issue) ReplaceLabels(labels []*Label) (err error) {
	sess := x.NewSession()
	defer sess.Close()
	if err = sess.Begin(); err != nil {
		return err
	}

	if err = issue.clearLabels(sess); err != nil {
		return fmt.Errorf("clearLabels: %v", err)
	} else if err = issue.addLabels(sess, labels); err != nil {
		return fmt.Errorf("addLabels: %v", err)
	}

	return sess.Commit()
}
536495
func Delete(url string, v ...interface{}) (*Resp, error) {
	return std.Delete(url, v...)
}
118007
func (r *AppPackageService) Delete(appId string, version string) *AppPackageDeleteCall {
	c := &AppPackageDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.appId = appId
	c.version = version
	return c
}