Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/droath/robo-github
Run GitHub remote commands from the Robo task runner.
https://github.com/droath/robo-github
github robo robo-tasks
Last synced: 7 days ago
JSON representation
Run GitHub remote commands from the Robo task runner.
- Host: GitHub
- URL: https://github.com/droath/robo-github
- Owner: droath
- Created: 2017-04-02T00:47:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-11T21:45:51.000Z (about 7 years ago)
- Last Synced: 2024-11-11T03:52:09.417Z (7 days ago)
- Topics: github, robo, robo-tasks
- Language: PHP
- Size: 7.81 KB
- Stars: 1
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Robo GitHub
Run GitHub commands from the Robo task runner.
### Getting Started
First, you'll need to download the Robo GibHub library using composer:
```bash
composer require droath/robo-github
```Next, you'll need to create a personal access token on GitHub so you have access to your private repositories via a Robo task. Follow this [GitHub guide](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) to obtain your access token.
Once you've created your GitHub token you'll need to pass the access token along with the GitHub project user or organization and repository name, like the following:
```php
taskGitHubIssueAssignees($token, $account, $repository)
...
...
->run();var_dump($response);
```The GitHub account and repository arguments can also be defined using the set methods:
```php
taskGitHubIssueAssignees('OJuJcqaYiX5uL72Ky')
->setAccount('droath')
->setRepository('robo-github')
...
->run();var_dump($response);
```### Example
**Retrieve GitHub issues:**
```php
taskGitHubIssueList('OJuJcqaYiX5uL72Ky')
->setAccount('droath')
->setRepository('robo-github')
->filter('assigned')
->state('opened')
->labels(['bug', 'duplicates'])
...
->run();var_dump($issues);
```**Assign a GitHub issue:**
```php
taskGitHubIssueAssignees('OJuJcqaYiX5uL72Ky')
->setAccount('droath')
->setRepository('robo-github')
->number($number)
->addAssignee($assignee)
->run();
```**Create repository statuses:**
```php
taskGitHubIssueAssignees('OJuJcqaYiX5uL72Ky')
->setAccount('droath')
->setRepository('robo-github')
->setSha($sha)
->setParamState($state)
->setParamDescription('State description!')
->setParamContext('vendor/projctname')
->run();```
### Support
I'll be adding more GitHub commands as they're needed. Feel free to create a PR or an issue with any problems you're having.