承接 droath/robo-github 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

droath/robo-github

Composer 安装命令:

composer require droath/robo-github

包简介

GitHub for Robo Task Runner

README 文档

README

Run GitHub commands from the Robo task runner.

Getting Started

First, you'll need to download the Robo GibHub library using composer:

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 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
    $token = 'OJuJcqaYiX5uL72Ky';
    $account = 'droath';
    $repository = 'robo-github';

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

    var_dump($response);

The GitHub account and repository arguments can also be defined using the set methods:

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

    var_dump($response);

Example

Retrieve GitHub issues:

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

    var_dump($issues);

Assign a GitHub issue:

<?php
    // 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();

Create repository statuses:

<?php

	// 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();

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.

统计信息

  • 总下载量: 11.66k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固