npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yapi-plugin-gitlab-patched

v1.0.9

Published

devops with gitlab for yapi

Downloads

13

Readme

yapi-plugin-gitlab

yapi gitlab(支持gitlab 10.0.0以上)集成插件,配置方法如下:

功能说明

  1. 提供gitlab oauth2登录

  2. 提供项目创建接口,配置gitlab的system hooks,可同步生成工程。

  3. 提供yapi与gitlab分组成员同步接口

  4. 提供yapi与gitlab项目成员同步接口

配置

第一步:在gitlab中配置oauth2, 生成appId、secret。

gitlab setting1

第二步:在gitlab中配置access-token

gitlab setting2

第三部:在gilab中配置回调函数

gitlab setting3

第四步:在生成的配置文件config.json中加入如下配置

"plugins": [{
    "name": "gitlab",
    "options": {
        "host" : "http://gitlab.example.com:port",
        "redirectUri" : "http://yapi.example.com:3000/api/plugin/oauth2/callback",
        "appId" : "xxxxxxxxxxxxxxxxxx",
        "appSecret" : "xxxxxxxxxxxxxxxxxxxxxx",
        "accessToken": "xxxxxxxxxxxxxxxxxxxxxxxx",
        "loginPath": "/api/v4/user",
        "authPath" : "/oauth/authorize",
        "tokenPath" : "/oauth/token",
        "emailKey" : "email",
        "userKey" : "username",
        "emailPostfix" : "@yapi.com"
    }
}]

配置含义如下:

  • host gitlab部署地址
  • redirectUri oauth2回调地址
  • appId 第一步中gitlab生成的Application ID
  • appSecret 第一步中gitlab生成的Secret
  • loginPathauthPathtokenPath oauth2基本配置(一般无需修改,直接复制)
  • emailKey gitlab用户信息邮箱关键字
  • userKey gitlab用户信息用户名关键字
  • emailPostfix 如果gitlab用户没有邮箱信息在yapi中,已gitlab用户名+该后缀作为邮箱地址

效果图示

yapi login

yapi group async

yapi project async

鸣谢

xwxsee2014