Giter Site home page Giter Site logo

lab's Issues

啥时候发 1.0.0 版本

0.x 开头的话,给用户不够正式的错觉

其实这个项目应该已经挺好用的了?

Add Project Variables feature

Would be very useful to be added to the project, here is an example of fetching Project Variables from the API in Ruby (supporting a hardcoded max of 2 paginated pages of variables at 100 per page).

It's nice to group variables by 'environment_scope', and do an alphabetical sort for presentation.

#!/usr/bin/env ruby

require 'net/http'
require 'json'


unless defined?(ENV['GITLAB_PERSONAL_TOKEN'])
  puts 'GITLAB_PERSONAL_TOKEN required'
  exit 1
end


TOKEN=ENV['GITLAB_PERSONAL_TOKEN']
PROJECT_ID=File.read('.gitlab/project_id')
API_ENDPOINT="https://gitlab.com/api/v4/projects/#{PROJECT_ID}/variables"
PER_PAGE=100

def fetch_project_variables_page(page)

  uri = URI(API_ENDPOINT + "?per_page=#{PER_PAGE}&page=#{page}")
  Net::HTTP.start(uri.host, 443,
    :use_ssl => uri.scheme == 'https') do |http|
    request = Net::HTTP::Get.new uri
    request['PRIVATE-TOKEN'] = TOKEN

    response = http.request(request)

    project_variables = JSON.parse(response.body)

    project_variables

  end

end



def print_vars

  project_variables = Array.new

  page_1 = fetch_project_variables_page(1)
  page_2 = fetch_project_variables_page(2)

  project_variables = project_variables + page_1

  if page_2.count > 99
     puts 'real pagination of Gitlab Project Variables should be implemented. exiting'
     exit 1
  else
      project_variables = project_variables + page_2
  end



  group_by_scope = project_variables.group_by {|x| x['environment_scope']}

  group_by_scope.each_pair do |scope,vars|

   puts "-----------------------------------------------------------------"
   puts scope
   puts "-----------------------------------------------------------------"

   sorted_vars = vars.sort_by { |v| v['key'] }
   sorted_vars.each do |var|
     puts "#{var['key']}=#{var['value']}"
   end

   puts ''

  end

end


print_vars

加快lab sync速度

  • 试试对每一页projects,开一个goruntine获取,看看会不会加快速度

`lab sync` support wiki

GitLab 中,有些项目是开启 wiki 的。

对于此类项目,可以使用 git clone https://gitlab.com/group/project.git 来克隆本体,也可以使用 git clone https://gitlab.com/group/project.wiki.git 来克隆 wiki 项目~

希望 sync 的时候可以支持一下 (或者 clone 的时候支持下也行?

Multiple servers

Is it possible to use multiple gitlab servers ? using multiple config files o multiple configurations at config.toml ?

jump to repo

希望提供一个命令来快速调到指定的项目目录

lab server -> cd xx.gitlab.cm/abc/be/server/

How to start?

I followed the README.md and this happens:

image

When I run the go get it downloads fine (Screenshot is after)
Then, I try to run lab or lab config and it doesn't find it

lab project create no longer works

the above command on lab v0.2.20 now returns an error. All my project scripts now fail. macOS Big Sur and on Linux. All used to work well until recently. The feature appears to have been removed.

`lab clone` support group

if there are 4 repo:

core/user
core/server
core/deploy
my/user

i want to use something like lab clone core/ to clone all repo in group

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.