PHP code example of droath / robo-github

1. Go to this page and download the library: Download droath/robo-github library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

droath / robo-github example snippets



    $token = 'OJuJcqaYiX5uL72Ky';
    $account = 'droath';
    $repository = 'robo-github';

    $response = $this
        ->taskGitHubIssueAssignees($token, $account, $repository)
        ...
        ...
        ->run();

    var_dump($response);


    $response = $this
        ->taskGitHubIssueAssignees('OJuJcqaYiX5uL72Ky')
        ->setAccount('droath')
        ->setRepository('robo-github')
        ...
        ->run();

    var_dump($response);


    $issues = $this->taskGitHubIssueList('OJuJcqaYiX5uL72Ky')
        ->setAccount('droath')
        ->setRepository('robo-github')
        ->filter('assigned')
        ->state('opened')
        ->labels(['bug', 'duplicates'])
        ...
        ->run();

    var_dump($issues);


    // The GitHub issue number.
    $number = 6;

    // The GitHub user name to assign the issue too.
    $assignee = 'droath';

   $response = $this->taskGitHubIssueAssignees('OJuJcqaYiX5uL72Ky')
        ->setAccount('droath')
        ->setRepository('robo-github')
        ->number($number)
        ->addAssignee($assignee)
        ->run();



	// GitHub commit sha reference.
	$sha = 'c70cc19bc1bc817971ad693e58a15ed5703b439d';
	
	// GitHub status state.
	$state = 'success';
	
	$this->taskGitHubIssueAssignees('OJuJcqaYiX5uL72Ky')
        ->setAccount('droath')
        ->setRepository('robo-github')
        ->setSha($sha)
        ->setParamState($state)
        ->setParamDescription('State description!')
        ->setParamContext('vendor/projctname')
        ->run();