Skip to content

Conversation

@rahul-deepsource
Copy link
Contributor

@siddhant-deepsource
Copy link
Contributor

@rahul-deepsource Please change the target branch to develop. We will be merging everything to master soon though :)

@sourya-deepsource sourya-deepsource changed the base branch from master to develop August 6, 2021 10:22
@rahul-deepsource rahul-deepsource force-pushed the rahul-deepsource-patch-1 branch from d6f3811 to 771038b Compare August 10, 2021 08:18
Co-authored-by: Sourya Vatsyayan <sourya@deepsource.io>
@rahul-deepsource rahul-deepsource merged commit 41d9a42 into develop Aug 10, 2021
@rahul-deepsource rahul-deepsource deleted the rahul-deepsource-patch-1 branch August 10, 2021 08:32
siddhant-deepsource added a commit that referenced this pull request Nov 2, 2021
* Add boilerplate and version command (#50)

* Add basic boilerplate with version command

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add utility to dynamically read version info

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add test

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Autofix issues in 4 files

Resolved issues in the following files via DeepSource Autofix:
1. init.go
2. pkg/cmd/cmd.go
3. pkg/cmd/version/version.go
4. tests/report_workflow_test.go

* Terminate Execute error in caller function

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Update pkg/cmd/cmd.go

Co-authored-by: Vishnu Jayadevan <68588475+vishnu-deepsource@users.noreply.github.com>

* Minor refactoring for CLI auth (#54)

Signed-off-by: Vishnu Jayadevan <vishnu@deepsource.io>

* Fix grammatical error

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Vishnu Jayadevan <68588475+vishnu-deepsource@users.noreply.github.com>
Co-authored-by: Sanket Saurav <sanket@deepsource.io>

* feat: cli authentication (#57)

* cli login implementation

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* minor improvements

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Refactor mutations and return error if login fails

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Remove unnecessary brace

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Remove unnecessary file

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Refactor api directory

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Implement config factory

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* [WIP] Implement token verification

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Use machinebox/graphql and get deviceCode query working

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Use machinebox for fetching jwt

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Remove commented code

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Re-authenticate confirmation prompt

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix reauthentication

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add logout command implementation

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix import error

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add confirmation before logout

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add refresh token query

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Implement auth refresh

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Implement auth status

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Implement repo status command

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Implement repo view command

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add comment

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Merge config generator code

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Move survey prompt functions to cmdutils package

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Integrate analyzer and transformer apis into config generator

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Remove .deepsource.toml file

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Integrate analyzer and transformer apis into config validator

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add queries for issue list

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix resolving owner

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix issue list

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Raise error when the limit is greater than 100

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Push fix

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Last minute fixes

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Change api endpoint

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Remove stale deepsource.toml file (#58)

* Fix retrieval of sentry DSN (#59)

* Remove legacy files and fetch sentry dsn from ldflag

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Declare sentry dsn variable

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Use goreleaser supplied version flag (#60)

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add version ldflag to goreleaser config (#61)

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Support darwin/arm64 and other arm architecture (#65)

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add github action workflow for goreleaser (#63)

* Add github action workflow for goreleaser

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Use workdir to switch to directory containing main package

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Accepts all tags for release creation

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add goreleaser workflow to publish homebrew tap (#67)

* Add goreleaser workflow to publish homebrew tap

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add recipe name

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix the homebrew tap reponame

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Only target arm64 builds for now

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Supply github token for brew publishing

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

Use deepsourcebot for pushing taps (#69)

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

Fix token retrieval (#70)

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

Some changes to test brew tap (#71)

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

Supply token to brew workflow

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

Use different token for goreleaser

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

Restore permissions

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

Use same token for homebrew as well as goreleaser

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

Use PAT as GITHUB_TOKEN

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

Use different token for homebrew

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* PLT-2365: Increase limit of uploads to 20 MB (#68)

* feat: DeepSource independent SDK package and code refactoring (#66)

* Move the api code to sdk directory

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Use deepsource sdk in config generation and validation workflows

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add global package and modify auth commands w.r.t sdk package

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix the changes in auth w.r.t using sdk

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Modify the repo and issues commands according to the sdk

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Minor fixes

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix setting the tokenExpiry in the config

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Minor fixes in auth related changes

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix setting the tokenExpiry (again)

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix errors while fetching analyzers and transformers list

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix the config validator path extraction

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix issues listing

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Autofix issues in 3 files

Resolved issues in the following files via DeepSource Autofix:
1. command/root.go
2. deepsource/client.go
3. deepsource/repo/queries/repo_status.go

* Implement args validation

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix DeepSource issues

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Rename cmdutils to utils

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Refactor SDK response types and improve usage of global variables

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Refactor issue listing command

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* More fixes related to issue listing and config workflows

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Fix repo status workflow

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* More refactoring in commands

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Autofix issues in 5 files

Resolved issues in the following files via DeepSource Autofix:
1. command/auth/status/status.go
2. command/config/generate/generic_input.go
3. command/repo/status/status.go
4. utils/fetch_remote.go
5. utils/prompt.go

* Rename repo to repository and improve config reading and loading

Signed-off-by: siddhant-deepsource <siddhant@deepsource.io>

* Add sentry to report error

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Delete internal/config package and add comments to SDK code

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* More refactoring of auth subcommands

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* More refactoring of config generate subcommand

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Address codereview for auth package

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Fetch analyzers and transformers data in a single utility

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Refactor remote selection logic and other code review suggested changes

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Fix errors

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Make the host configurable while authentication

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Use the host set by user in SDK client

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Fixes in setting SDK host and fix tokenexpiry timezone setting

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Improve refreshAuth response workflow and minor changes in utils

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Modify the retrieval of config and minor fixes

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Remove unnecessary use of `fmt.Sprintf` (#73)

* Remove unnecessary use of `fmt.Sprintf`

* chore:fix DeepSource issue

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Remove unnecessary calls to fmt.Sprint (#74)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Omit comparison with boolean constant (#75)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Use plain channel send or receive (#76)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* test: add unit tests to configvalidator package (#77)

* Add tests to config validator package

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* tests: improve tests and add test names

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: revert changes in unmarshalling toml

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* fix: fix DeepSource issue

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Format code with gofmt (#79)

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

Details: https://deepsource.io/gh/deepsourcelabs/cli/transform/c5e55d29-af89-4939-92a5-ee7ec1aab303/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* feat(config-generation): Retrieve compulsory analyzer meta input based on API response (#72)

* Dynamic analyzer meta input based on API response

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Autofix issues in 1 file

Resolved issues in command/config/generate/analyzers_input.go via DeepSource Autofix

* chore: refactor code into separate functions

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* fix: Fix DeepSource issues

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: Rename Field to FieldName

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: Add comments

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* Use gabs to parse analyzer meta JSON

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* refactor: move the data extraction logic to separate function

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* fix: restore analyzer meta required data to nil before checking for next analyzer

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: address code review

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: make changes according to code review

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: create array with length 0 and append data

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* feat: support enterprise server (#78)

* chore: configure enterprise api endpoint

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* fix: fix api endpoint

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: address code review

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: improve framing API client URL

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* feat: interactive login flag

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: remove dependency of sdk package on config package

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* refactor: rename ClientProperties as ClientOpts

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* refactor: rename AnaData and TrData

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* fix: use analyzer shortcode for filtering analyzerMeta

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: cleanup analyzer and transformer API data population logic

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: add spaces

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: delete api folder and modify workflow

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: tidy go modules

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: tidy go modules

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: fix and modify legacy test

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* fix: fix error

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* chore: address DeepSource issues

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* fix: handle DSN parsing error

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

* fix: handle DSN parsing error at an earlier step as well

Signed-off-by: Siddhant N Trivedi <siddhant@deepsource.io>

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Vishnu Jayadevan <68588475+vishnu-deepsource@users.noreply.github.com>
Co-authored-by: Sanket Saurav <sanket@deepsource.io>
Co-authored-by: Rahul Jha <68377773+rahul-deepsource@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants