0.11.2 • Published 5 months ago

@codefresh-io/cf-git-providers v0.11.2

Weekly downloads
9
License
MIT
Repository
github
Last release
5 months ago

cf-git-providers

An NPM module/CLI for interacting with various git providers

Using the CLI

Install

In case you have node.js installed you can easily install with NPM:

npm install -g @codefresh-io/cf-git-providers

Or you can run it as a Docker container:

docker run -it --rm --entrypoint "sh" codefresh/cgp

Authenticate

To use the cli tool you will need to provide it with a Codefresh git context which you can get by using the codefresh-cli:

codefresh get context <context-name> -o json --decrypt | base64

Then, to provide this value to the cli by adding it to each command with the flag --git-context or (preferably) by exporting the CF_GIT_CONTEXT environment variable, example:

export CF_GIT_CONTEXT=$(codefresh get context <context-name> -o json --decrypt | base64)

Usage

Examples:

  • To get the list of repositories for a specific owner:

    	```cgp list repos --owner codefresh-io```
  • To create a repository webhook:

    	```cgp create webhook --owner codefresh-io --repo cli --endpoint http://example.com  --secret some-secret```

Using the npm module

Install

With npm:

npm install @codefresh-io/cf-git-providers

With yarn:

yarn add @codefresh-io/cf-git-providers

Usage

import { getProviderByContext } from '@codefresh-io/cf-git-providers'

(async function () {
	try {
		const provider = await getProviderByContext(gitContext, providerOptions)
		const fileContents = await provider.fetchRawFile({ owner, repo, ref, path })
		console.log(fileContents)
	} catch (error) {
		console.error(error)
	}
})()
0.11.2

5 months ago

0.9.3

9 months ago

0.10.1

7 months ago

0.10.0

7 months ago

0.11.0

6 months ago

0.11.1

6 months ago

0.9.2

10 months ago

0.9.1

10 months ago

0.9.0

10 months ago

0.8.5

11 months ago

0.8.4

11 months ago

0.8.3

11 months ago

0.8.2

11 months ago

0.8.1

11 months ago

0.7.2

12 months ago

0.7.1

1 year ago

0.7.0

1 year ago

0.5.0

2 years ago

0.5.1

1 year ago

0.4.27

2 years ago

0.5.0-CR-14399

2 years ago

0.5.0-CR-14399-2

2 years ago

0.6.1

1 year ago

0.6.0

1 year ago

0.4.26

2 years ago

0.4.20

2 years ago

0.4.21

2 years ago

0.4.24

2 years ago

0.4.25

2 years ago

0.4.22

2 years ago

0.4.23

2 years ago

0.4.19

2 years ago

0.4.17

2 years ago

0.4.18

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.4.10

2 years ago

0.4.15

2 years ago

0.4.16

2 years ago

0.4.13

2 years ago

0.4.14

2 years ago

0.4.11

2 years ago

0.4.12

2 years ago

0.4.5

2 years ago

0.4.7

2 years ago

0.4.6

2 years ago

0.4.4-CR-10173

2 years ago

0.4.4-CR-10173-3

2 years ago

0.4.4

2 years ago

0.3.0

2 years ago

0.3.1

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.1.6

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.46

3 years ago

0.0.45

3 years ago

0.0.44

3 years ago

0.0.43

4 years ago

0.0.42

4 years ago

0.0.41

4 years ago

0.0.40

4 years ago

0.0.39

4 years ago

0.0.38

4 years ago

0.0.37

4 years ago

0.0.36

4 years ago

0.0.35

4 years ago

0.0.33

4 years ago

0.0.34

4 years ago

0.0.32

4 years ago

0.0.31

4 years ago

0.0.30

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.14

4 years ago

0.0.15

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago