定制 lcainswebdeveloper/gitlab-issue-reporter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

lcainswebdeveloper/gitlab-issue-reporter

Composer 安装命令:

composer require lcainswebdeveloper/gitlab-issue-reporter

包简介

Simple wrapper for logging issues in Gitlab

README 文档

README

Small service for logging issues in Gitlab.

Please note this is still a work in progress

Installation from Composer

  • composer require lcainswebdeveloper/gitlab-issue-reporter

Configuration

  • All you will need to do is set a GITLAB_BASE_URL (eg https://gitlab.com/api/v4/projects/) for your Gitlab instance, your GITLAB_PROJECT_ID, GITLAB_ASSIGNEE_ID which is your gitlab user id and can be found in you user setting, and finally your GITLAB_ACCESS_TOKEN which you can create inside of your Gitlab UI at the following url: [https://gitlab.com/profile/personal_access_tokens]. Be sure to create this token with API access. Once created, i'd recommend you put these in an env file. Please see .env.example for details. Ultimately these just get used as values to get passed into our Gitlab class so feel free to set to your requirements.

To create an issue

This service delegates straight to the Gitlab API itself so arguments can be passed as expected for all calls. Please feel free to look at the tests for usage also.
Creating an issue (simple example):

use Gitlab\Gitlab;
$client = new Gitlab(GITLAB_BASE_URL, GITLAB_ACCESS_TOKEN);
$validIssue = $client->createIssue([
    'title' => 'Your title',
    'description' => 'Your description',
    'confidential' => true,
    'labels' => 'aaa,bbb,ccc',
    etc ...
]);

The response mirrors the response from the API itself

Local Development

The easiest means is to use in a Docker environment but if you have >= php 7.2 and composer installed on your system, you should be good to go.

A docker-compose file has been provided for easy development so if you simply clone the repo into your project and then run docker-compose up -d the environment will build itself.

Once this is done, you just need to run composer install docker-compose exec gitlab-php composer install and tests can be run: docker-compose exec gitlab-php vendor/bin/phpunit --colors(please note before running tests make sure you have some kind of sandbox repository setup in gitlab and that you update your environment vars accordingly).

Once your environment is built you should be able to visit http://localhost:8011 in your browser and view a sample form for use of this app.

FEEDBACK, COMMENTS, ISSUES ETC ALL WELCOME. ENJOY ...

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-06-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固