bitbucket-feed v0.3.0
bitbucket-feed
This is a Faros feed that produces data for the VCS schema. When run will upload data to the feeds server as a new revision.
The feed pulls the following resources from Bitbucket REST API for each workspace the authenticated user has access to:
- Workspace users
- Repositories
- Pull Requests
- Issues
- Commits
Quickstart
:clipboard: NOTE: Running this feed requires a valid Faros account. To setup Faros see the getting started guide
Run the feed
To run the feed:
npm i # Install.
npm t -- --watch # Test, watching for changes.
$ ./bin/bitbucket-feed \
-k $FAROS_API_KEY \
-t $BITBUCKET_TOKEN
Or install it:
npm install -g bitbucket-feed
And then run:
$ faros-bitbucket-feed \
-k $FAROS_API_KEY \
-t $BITBUCKET_TOKEN
Authentication
Running the feed requires a valid Bitbucket account and a Bitbucket user/client. Currently the minimum required scopes for this feed are
- issue - Read your repositories' issues
- repository - Read your repositories
- pullrequest - Read your repositories and their pull requests
Using token
--token $BITBUCKET_TOKEN
Using username
and password
--username $BITBUCKET_USERNAME --password $BITBUCKET_PASSWORD
Bitbucket server
The feed defaults to pulling data from the Bitbucket Cloud REST API v2 (https://api.bitbucket.org/2.0). To run against a different Bitbucket server:
--base-url $BITBUCKET_BASE_URL
Faros feeds server
By default the feed will push records to the Faros Cloud production server. You can point to a different Faros server with:
--server-url $FAROS_SERVER_URL
Feed data upload strategy
The Bitbucket feed runs using an incremental
data upload strategy where new
entries are upserted into the graph. You can override this by using full
strategy where all old entries of vcs models are deleted with:
--no-incremental
See faros-bitbucket-feed --help
for more options, including flag shorthands.
3 years ago