jruedaq/php-github-issues-report
Composer 安装命令:
composer require jruedaq/php-github-issues-report
包简介
Create a Github issue in a repository from PHP project
README 文档
README
PHP Github Issues Report
First steeps
Installation
composer require jruedaq/PHP-Github-issues-report
Basic use
Create Github personal access token
In Developer settings need create a personal access token and set repo permission
For private repositories use, set all repo permission
If need use only public repositories, set public_repo permission
Use library
In your php file call autoload.php
require 'vendor/autoload.php';
Call the function and pass the respective parameters
$issueNumber = PHPGithubIssuesReport::send($owner, $repo, $token, $title, $body);
Complete example
<?php use jruedaq\GithubIssuesReport\PHPGithubIssuesReport; require_once '../vendor/autoload.php'; $owner = 'Oneago'; // User or company username $repo = 'CanvasVoteSystem'; // Repository name $token = '870082df3998d104ba4164cb07217d5a734bb8fd'; // Personal access token, get from {@link https://github.com/settings/tokens} with [repo] permission $title = 'Testing a issue reporting from PHP'; // Title for new issue $body = 'This is a description text bellow title in github issues'; // Body description for new issue try { $issueNumber = PHPGithubIssuesReport::send($owner, $repo, $token, $title, $body); echo "Created issue #$issueNumber"; // Display issue number } catch (Exception $e) { echo $e->getMessage(); }
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-17