public function edit($user, $repo, $issueId, $state = null, $title = null, $body = null, $assignee = null, $milestone = null, array $labels = null)
	{
		// Build the request path.
		$path = '/repos/' . $user . '/' . $repo . '/issues/' . (int) $issueId;

		// Craete the data object.
		$data = new \stdClass;

		// If a title is set add it to the data object.
		if (isset($title))
		{
			$data->title = $title;
		}

		// If a body is set add it to the data object.
		if (isset($body))
		{
			$data->body = $body;
		}

		// If a state is set add it to the data object.
		if (isset($state))
		{
			$data->state = $state;
		}

		// If an assignee is set add it to the data object.
		if (isset($assignee))
		{
			$data->assignee = $assignee;
		}

		// If a milestone is set add it to the data object.
		if (isset($milestone))
		{
			$data->milestone = $milestone;
		}

		// If labels are set add them to the data object.
		if (isset($labels))
		{
			// Ensure that we have a non-associative array.
			if (isset($labels))
			{
				$labels = array_values($labels);
			}

			$data->labels = $labels;
		}

		// Encode the request data.
		$data = json_encode($data);

		// Send the request.
		$response = $this->client->patch($this->fetchUrl($path), $data);

		// Validate the response code.
		if ($response->code != 200)
		{
			// Decode the error response and throw an exception.
			$error = json_decode($response->body);
			throw new \DomainException($error->message, $response->code);
		}

		return json_decode($response->body);
	}
public function edit($user, $repo, $issueId, $state = null, $title = null, $body = null, $assignee = null, $milestone = null, array $labels = null)
	{
		// Build the request path.
		$path = '/repos/' . $user . '/' . $repo . '/issues/' . (int) $issueId;

		// Craete the data object.
		$data = new \stdClass;

		// If a title is set add it to the data object.
		if (isset($title))
		{
			$data->title = $title;
		}

		// If a body is set add it to the data object.
		if (isset($body))
		{
			$data->body = $body;
		}

		// If a state is set add it to the data object.
		if (isset($state))
		{
			$data->state = $state;
		}

		// If an assignee is set add it to the data object.
		if (isset($assignee))
		{
			$data->assignee = $assignee;
		}

		// If a milestone is set add it to the data object.
		if (isset($milestone))
		{
			$data->milestone = $milestone;
		}

		// If labels are set add them to the data object.
		if (isset($labels))
		{
			// Ensure that we have a non-associative array.
			if (isset($labels))
			{
				$labels = array_values($labels);
			}

			$data->labels = $labels;
		}

		// Encode the request data.
		$data = json_encode($data);

		// Send the request.
		$response = $this->client->patch($this->fetchUrl($path), $data);

		// Validate the response code.
		if ($response->code != 200)
		{
			// Decode the error response and throw an exception.
			$error = json_decode($response->body);
			throw new \DomainException($error->message, $response->code);
		}

		return json_decode($response->body);
	}
public function edit ( $ user , $ repo , $ issueId , $ state = null , $ title = null , $ body = null , $ assignee = null , $ milestone = null , array $ labels = null ) { // Build the request path. $ path = '/repos/' . $ user . '/' . $ repo . '/issues/' . ( int ) $ issueId ; // Craete the data object. $ data = new \ stdClass ; // If a title is set add it to the data object. if ( isset ( $ title ) ) { $ data -> title = $ title ; } // If a body is set add it to the data object. if ( isset ( $ body ) ) { $ data -> body = $ body ; } // If a state is set add it to the data object. if ( isset ( $ state ) ) { $ data -> state = $ state ; } // If an assignee is set add it to the data object. if ( isset ( $ assignee ) ) { $ data -> assignee = $ assignee ; } // If a milestone is set add it to the data object. if ( isset ( $ milestone ) ) { $ data -> milestone = $ milestone ; } // If labels are set add them to the data object. if ( isset ( $ labels ) ) { // Ensure that we have a non-associative array. if ( isset ( $ labels ) ) { $ labels = array_values ( $ labels ) ; } $ data -> labels = $ labels ; } // Encode the request data. $ data = json_encode ( $ data ) ; // Send the request. $ response = $ this -> client -> patch ( $ this -> fetchUrl ( $ path ) , $ data ) ; // Validate the response code. if ( $ response -> code != 200 ) { // Decode the error response and throw an exception. $ error = json_decode ( $ response -> body ) ; throw new \ DomainException ( $ error -> message , $ response -> code ) ; } return json_decode ( $ response -> body ) ; }
Method to update an issue.

@param   string   $user       The name of the owner of the GitHub repository.
@param   string   $repo       The name of the GitHub repository.
@param   integer  $issueId    The issue number.
@param   string   $state      The optional new state for the issue. [open, closed]
@param   string   $title      The title of the new issue.
@param   string   $body       The body text for the new issue.
@param   string   $assignee   The login for the GitHub user that this issue should be assigned to.
@param   integer  $milestone  The milestone to associate this issue with.
@param   array    $labels     The labels to associate with this issue.

@return  object

@since   1.0
@throws  \DomainException
Method to update an issue .