Update a label

@link https://developer.github.com/v3/issues/labels/#update-a-label

@param string $name
@param string $color

@return array
778053
public function updateLabel(string $name, string $color): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/labels/:name',
            $this->getIssues()->getOwner(), $this->getIssues()->getRepo(), $name), Request::METHOD_PATCH, [
                'color' => $color
            ]);
    }
18344
public function addCode($name, $label = '', $attr = [])
    {
        $c = new Column\Code($name, $label, $attr);
        $this->addColumn($c);
        return $c;
    }
783273
public function update($username, $repository, $label, $newName, $color)
    {
        $params = [
            'name'  => $newName,
            'color' => $color,
        ];

        return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels/'.rawurlencode($label), $params);
    }
652866
public function addLabelsToAnIssue($owner, $repo, $number, $name)
	{
		$data = array($name);

		return $this->client->request("/repos/$owner/$repo/issues/$number/labels", 'POST', json_encode($data), 200, '');
	}
215447
def _add_colorbar(self, m, CS, ax, name):
        '''  '''

        cb = m.colorbar(CS, "right", size="5%", pad="2%")
        cb.set_label(name, size=34)
        cb.ax.tick_params(labelsize=18)
597409
public function updateTags($id, $name)
    {
        $url = "https://api.weixin.qq.com/cgi-bin/tags/update?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['tag' => ['name' => $name, 'id' => $id]]);
    }
244114
public function update( string $name, $value ) {
		if ( $this->term->$name ) {
			return wp_update_term( $this->term_id, $this->taxonomy, [
				$name => $value
			] );
		} elseif ( $this->$name ) {
			return update_field( $name, $value, $this->term );
		}
		
		return FALSE;
	}
272665
protected function getLabels($title, $name)
    {
        if (is_array($title)) {
            $title = $this->getFirstElement($title);
        }

        $name = Helpers::removePostFixWith($name, '_id');

        $this->replaceModelName($title, $name, 'field_');

        if ($this->hasLanguages()) {
            $labels = [];

            foreach ($this->languages as $language) {
                $labels[$language] = $title;
            }

            return $labels;
        }

        return $title;
    }
884384
private Label getOrCreateLabel(final String name) {

		Label label = labelCache.get(name);
		if (label == null) {

			label = new LabelImpl(name);
			labelCache.put(name, label);
		}

		return label;
	}
1170909
public function setColor($color)
    {
        if (!empty($color)) {
            $this->color = $this->convertColor($color);
        }

        return $this;
    }
148587
public static function label( $name, $label, $help = '', $options = null ) {

		if ( is_array( $label ) || is_object( $label ) ) {
			$options = $label;
			$label   = $options['label'];

			if ( empty( $label ) ) {
				$label = ucwords( str_replace( '_', ' ', $name ) );
			}

			$help = $options['help'];
		} else {
			$options = self::options( null, $options );
		}

		$label = apply_filters( 'pods_form_ui_label_text', $label, $name, $help, $options );
		$help  = apply_filters( 'pods_form_ui_label_help', $help, $name, $label, $options );

		ob_start();

		$name_clean      = self::clean( $name );
		$name_more_clean = self::clean( $name, true );

		$type                = 'label';
		$attributes          = array();
		$attributes['class'] = 'pods-form-ui-' . $type . ' pods-form-ui-' . $type . '-' . $name_more_clean;
		$attributes['for']   = ( false === strpos( $name_clean, 'pods-form-ui-' ) ? 'pods-form-ui-' : '' ) . $name_clean;
		$attributes          = self::merge_attributes( $attributes, $name, $type, $options, false );

		pods_view( PODS_DIR . 'ui/fields/_label.php', compact( array_keys( get_defined_vars() ) ) );

		$output = ob_get_clean();

		return apply_filters( "pods_form_ui_{$type}", $output, $name, $label, $help, $attributes, $options );
	}
1221744
public function renameLabel(int $labelId, string $name): bool
    {
        return $this->updateLabel($labelId, $name);
    }
546047
public function update(string $id,
                           int $version,
                           string $name,
                           array $labels = null,
                           string $role = null,
                           string $availability = null)
    {
        $url = self::BASE_URL.'/'.$id.'/update?'.http_build_query(['version' => $version]);

        $request = [
            'Name' => $name,
            'Labels' => $labels,
            'Role' => $role,
            'Availability' => $availability,
        ];

        return $this->curl->post($url, json_encode($request));
    }
633179
public function label($name, $value = null, $options = [])
    {
        return parent::label($name, $value, $this->appendErrors($name, $options));
    }
223057
public function deleteLabel(string $name): bool
    {
        $this->getApi()->request($this->getApi()
                                      ->sprintf('/repos/:owner/:repo/labels/:name', $this->getIssues()->getOwner(),
                                          $this->getIssues()->getRepo(), $name));

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
842209
public static function make($name, $label = '')
    {
        if (is_array($name)) {
            return new static($name);
        }

        $data = [
            'name' => $name,
            'label' => $label ?: Str::title(str_replace('_', ' ', $name)),
        ];

        return new static($data);
    }
898717
protected function setColor(ColorInterface $color, bool $background = null): FormatterInterface
    {
        $name = $color->getName();
        $colors = $this->getColors();
        if (array_key_exists($name, $colors) === false) {
            throw new ColorNotSupported($color);
        }

        if ($background === true) {
            $this->background = $colors[$name] + 10;
        } else {
            $this->foreground = $colors[$name];
        }

        return $this;
    }