Commit Graph

191 Commits

Author SHA1 Message Date
Clement Sam dba5765fca
feat: add ability to set git protocol (#221)
* fix: repo clone requires authentication

Closes #198

* feat: add ability to set git protocol

* Format code with gofmt

This commit fixes the style issues introduced in 73ee693 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/1a6879e9-070f-4a9f-a42c-ae4469dfc95d/

* fix: bug risks

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-09-11 21:21:50 +00:00
Clement Sam b11ed7628c
feat: ability to create shell-executable aliases (#220) 2020-09-11 11:42:51 +00:00
Clement Sam 6c92d3f00d
feat: add ability to create repo from current directory (#218)
* feat: add ability to create repo from current directory

* Format code with gofmt

This commit fixes the style issues introduced in ddaebf3 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/e2c1f40c-cea6-4a3e-80e6-b1c0950aae08/

* fix: add optional bool param to initGitlabClient

* Format code with gofmt

This commit fixes the style issues introduced in 6c800da according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/444cacd9-4a43-4ca2-86d6-995afc398b28/

* fix: bug risks

* test: add createproject tests

* Format code with gofmt

This commit fixes the style issues introduced in b2c9547 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/dc04a902-f082-42be-a507-9dd0a493c138/

* fix: bug risks

* test: make test pass

* Format code with gofmt

This commit fixes the style issues introduced in 4739e9c according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/eafd4a64-1327-4b95-9f27-72510506dc81/

* test: make test pass

* test: make test pass

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-09-11 04:35:33 +00:00
Clement Sam 9630a8be38
test: test expand alias (#216)
* test: test expand alias

* chore(ci): add secure token to run tests on PR

* Format code with gofmt

This commit fixes the style issues introduced in 8d6ee7c according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/9003f4ec-3fa4-4058-966e-b29ca3c02f46/

* fix: travis secure data

* fix: update travis secure env

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-09-08 22:19:04 +00:00
Clement Sam 81913ce018
test: add tests to core commands (#209)
* fix: attach default username to bare repo

* test: add tests for core commands

* test: core commands

* Format code with gofmt

This commit fixes the style issues introduced in 2ee9d22 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/1fb78ec2-bb39-49e3-b352-f3402b1c2a1f/

* fix: Simplify regular expression by using raw string literal

* fix: minor bug risk

* Format code with gofmt

This commit fixes the style issues introduced in 2821e38 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/325e4718-6ffb-4fc0-8aec-b9e63a613bfa/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-09-06 16:44:25 +00:00
Clement Sam 75ec1b8075
chore(ci): travis tests (#208)
* chore(ci): set up travis to run tests

* fix: add gitlab.com to known hosts

* fix: add ssh

* fix: ssh exposure
2020-09-06 02:13:50 +00:00
Clement Sam f35054952f
Revert "chore(ci): set up travis to run tests (#206)" (#207)
This reverts commit 671077c123.
2020-09-06 02:05:36 +00:00
Clement Sam 671077c123
chore(ci): set up travis to run tests (#206)
* chore(ci): set up travis to run tests

* fix: add gitlab.com to known hosts

* fix: add ssh
2020-09-06 01:57:34 +00:00
andhe 761b8642e9
fix: File content modification made a bit more safe and sane (#202)
* Use atomic replace in config.SetEnv

This commits makes the .env file be replaced atomically.

The details of this commit includes:
- bail out when reading existing file fails, instead of destroying
  existing config file.
- importing the github.com/google/renameio module
- dropping unused lines variable
- dropping fmt.Sprint of item
- avoid stripping final newlines in created file
- skip over empty lines (ie. when reading data from non-existant file,
  last item in range after splitting on final newline in file)

* fix: Include final newline when writing to .gitignore

Leaving the file without a final newline in it makes it look ugly
for example when you run `cat .glab-cli/config/.env`.

Also drop the prepend of a newline is the ReadAndAppend method
to make it actually (only) append the data passed into it.
(This feels almost like a workaround for the previous missing trailing
newline, so should not be needed anymore now.)
2020-09-05 15:56:00 +00:00
Clement Sam 5b6317925e
fix: alias name conflicting core commands (#199)
* fix: alias name conflicting core commands

Additionally added messages to enhance tests

Reolves #194

* test: add test for aliasset

* Format code with gofmt

This commit fixes the style issues introduced in 2976fb2 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/af800910-a9d7-49d0-9834-3132c06f3b54/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-09-04 13:11:50 +00:00
dependabot[bot] e9c79d7ef8
chore(deps): bump github.com/stretchr/testify from 1.4.0 to 1.6.1 (#193)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.4.0 to 1.6.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.4.0...v1.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-03 20:16:45 +00:00
Clement Sam 1c9c89bf28 test: cover command tests 2020-09-02 18:28:51 +00:00
Clement Sam b8e5b6716e
refactor: fix module path (#190)
* refactor: fix module path

Change module path from glab to GitHub path in go.mod.
Tidy go.mod
Fix go imports.

Closes 189

* Format code with gofmt

This commit fixes the style issues introduced in 28e5336 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/398ecee6-d38c-472d-a91b-21de49624c9f/

* fix: unused imported package

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-09-02 12:20:33 +00:00
dependabot[bot] ea8d3a1757
chore(deps): bump github.com/gookit/color from 1.2.8 to 1.2.9 (#188)
Bumps [github.com/gookit/color](https://github.com/gookit/color) from 1.2.8 to 1.2.9.
- [Release notes](https://github.com/gookit/color/releases)
- [Commits](https://github.com/gookit/color/compare/v1.2.8...v1.2.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-02 11:05:14 +00:00
Clement Sam 29408f32c3
test: commands tests (#173)
* test: commands tests

* Format code with gofmt

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-09-02 11:04:56 +00:00
dependabot[bot] 3aa14262ce
chore(deps): bump github.com/xanzy/go-gitlab from 0.36.0 to 0.37.0 (#182)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.36.0...v0.37.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-31 08:09:06 +00:00
dependabot[bot] eaccd52887
chore(deps): bump github.com/gdamore/tcell from 1.3.0 to 1.4.0 (#169)
Bumps [github.com/gdamore/tcell](https://github.com/gdamore/tcell) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/gdamore/tcell/releases)
- [Commits](https://github.com/gdamore/tcell/compare/v1.3.0...v1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-26 09:03:12 +00:00
dependabot[bot] 46108b232b
chore(deps): bump github.com/gookit/color from 1.2.7 to 1.2.8 (#166)
Bumps [github.com/gookit/color](https://github.com/gookit/color) from 1.2.7 to 1.2.8.
- [Release notes](https://github.com/gookit/color/releases)
- [Commits](https://github.com/gookit/color/compare/v1.2.7...v1.2.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-25 07:28:53 +00:00
Clement Sam 4bd402b7bf fix: update check version (#89) 2020-08-24 07:03:20 +00:00
dependabot[bot] 2b834a37bf
chore(deps): bump github.com/xanzy/go-gitlab from 0.35.1 to 0.36.0 (#155)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.35.1 to 0.36.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.35.1...v0.36.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-20 06:16:15 +00:00
Clement Sam 09ba1378f4 refactor: enhance error handling 2020-08-15 08:39:03 +00:00
dependabot[bot] 5e7ccf231f
chore(deps): bump github.com/xanzy/go-gitlab from 0.35.0 to 0.35.1
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.35.0 to 0.35.1.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.35.0...v0.35.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-14 08:22:37 +00:00
Clement Sam 2eb0f0c7cc Feat: live pipeline gui view with keybinded controls 2020-08-14 08:19:03 +00:00
Clement Sam 90f4d8af52 feat: trace pipeline 2020-08-13 02:15:04 +00:00
Clement Sam eb8b69a1af Merge github.com:profclems/glab into ft-live-pipeline-view 2020-08-12 08:10:26 +00:00
dependabot[bot] 7e30c6ae77
chore(deps): bump github.com/xanzy/go-gitlab from 0.34.2 to 0.35.0
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.34.2 to 0.35.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.34.2...v0.35.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-12 05:51:44 +00:00
Clement Sam e3c5f8f03e Merge github.com:profclems/glab into ft-live-pipeline-view 2020-08-11 23:02:19 +00:00
Clement Sam ca30d8bc57 Feature(pipeline): live pipeline 2020-08-11 18:36:44 +00:00
dependabot[bot] e56dc0ff46
chore(deps): bump github.com/AlecAivazis/survey/v2 from 2.1.0 to 2.1.1
Bumps [github.com/AlecAivazis/survey/v2](https://github.com/AlecAivazis/survey) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/AlecAivazis/survey/releases)
- [Commits](https://github.com/AlecAivazis/survey/compare/v2.1.0...v2.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-11 06:08:16 +00:00
dependabot[bot] 0b21385721
Bump github.com/xanzy/go-gitlab from 0.34.1 to 0.34.2
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.34.1 to 0.34.2.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.34.1...v0.34.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-10 06:35:45 +00:00
Clement Sam 2f0fa5adef Fix(conflicts): merge conflicts 2020-08-09 10:44:13 +00:00
Clement Sam 0c56135072 Refactor: Restructure Project with cobra
Fix(crash): #60
Fix(help): #66
Fix(output): ansi style output on windows #54
Fix: #53
2020-08-09 09:58:28 +00:00
Clement Sam ad2a683372
Merge pull request #70 from abakermi/add-repos-clone
Add repos clone
2020-08-08 16:59:29 +00:00
Abdelhak Akermi 3f65181ee0 add dep 2020-08-08 15:12:34 +03:00
dependabot[bot] 5ff03d2a6e
Bump github.com/xanzy/go-gitlab from 0.34.0 to 0.34.1
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.34.0 to 0.34.1.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.34.0...v0.34.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-07 06:53:15 +00:00
dependabot[bot] 66dda778b6
Bump github.com/xanzy/go-gitlab from 0.33.0 to 0.34.0
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.33.0...v0.34.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-06 06:50:51 +00:00
Clement Sam c2456f2eb8 Refactor(go-gitlab): use go-gitlab module 2020-08-03 08:11:06 +00:00
Clement Sam 760f2b7d5e Fixes global configurations #26 2020-07-31 06:36:23 +00:00
Clement Sam 65ee07881a Fixes #2 2020-07-25 03:40:44 +00:00
Clement Sam 7f83b756fb Added Issue Creation functionality 2020-07-24 22:00:39 +00:00
Clement Sam f40e412464 Initial Commit 2020-07-24 20:41:26 +00:00