Skip to content

Commit

Permalink
Merge pull request #78 from DrFaust92/scopes
Browse files Browse the repository at this point in the history
Scopes Docs
  • Loading branch information
DrFaust92 authored Jun 18, 2022
2 parents 76a7be3 + db78206 commit e3d132d
Show file tree
Hide file tree
Showing 29 changed files with 61 additions and 27 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
Expand All @@ -26,25 +26,9 @@ jobs:
markdown-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: avto-dev/markdown-lint@v1
with:
config: '.markdownlint.yml'
args: 'docs'
misspell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# See also: https://github.com/actions/setup-go/pull/62
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: go install github.com/client9/misspell/cmd/misspell
- run: misspell -error -source text docs/

6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
name: Run linter
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
version: v1.46.2
only-new-issues: true
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: '1.18'
-
name: Import GPG key
id: import_gpg
Expand All @@ -39,7 +39,7 @@ jobs:
PASSPHRASE: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.8.0
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
Expand Down
1 change: 0 additions & 1 deletion .go-version

This file was deleted.

2 changes: 2 additions & 0 deletions docs/data-sources/current_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Provides a way to fetch data of the current user.

OAuth2 Scopes: `account`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/hook_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Provides a way to fetch data of hook types.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/ip_ranges.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Provides a way to fetch IP Ranges for whitelisting.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/pipeline_oidc_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Provides a way to fetch data on a pipeline OIDC Config.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/pipeline_oidc_config_keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Provides a way to fetch data on a pipeline OIDC Config Keys.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Provides a way to fetch data on a workspace.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/workspace_members.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Provides a way to fetch data on a the members of a workspace.

OAuth2 Scopes: `account`

## Example Usage

```hcl
Expand Down
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ The following arguments are supported in the `provider` block:

* `oauth_token` - (Optional) Your password used to connect to bitbucket. You can
also set this via the environment variable. `BITBUCKET_OAUTH_TOKEN`

## OAuth2 Scopes

To interacte with the Bitbucket API, an [App Password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) is required. App passwords are limited in scope, each API requires certain scopse to interact with, each resource doc will specifiy what are the scopes required to use that resource. See [Docs](https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/) for more inforamtion on scopes.
2 changes: 2 additions & 0 deletions docs/resources/branch_restriction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a Bitbucket branch restriction resource.

This allows you for setting up branch restrictions for your repository.

OAuth2 Scopes: `repository:admin`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/branching_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a Bitbucket branching model resource.

This allows you for setting up branching models for your repository.

OAuth2 Scopes: `repository:admin`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/default_reviewers.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

Provides support for setting up default reviewers for your repository. You must however have the UUID of the user available. Since Bitbucket has removed usernames from its APIs the best case is to use the UUID via the data provider.

OAuth2 Scopes: `pullrequest` and `repository:admin`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/deploy_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a Bitbucket Deploy Key resource.

This allows you to manage your Deploy Keys for a repository.

OAuth2 Scopes: `repository` and `repository:admin`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ description: |-

This resource allows you to setup pipelines deployment environments.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/deployment_variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ description: |-

This resource allows you to configure deployment variables.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/forked_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ private, how to fork the repository and other options. SCM cannot be overridden,
as it is inherited from the parent repository. Creation will fail if the parent
repo has `no_forks` as its fork policy.

OAuth2 Scopes: `repository`, `repository:admin`, and `repository:delete`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a Bitbucket hook resource.

This allows you to manage your webhooks on a repository.

OAuth2 Scopes: `webhook`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/pipeline_schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a Bitbucket Pipeline Schedule resource.

This allows you to manage your Pipeline Schedules for a repository.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/pipeline_ssh_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a Bitbucket Pipeline Ssh Key resource.

This allows you to manage your Pipeline Ssh Keys for a repository.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/pipeline_ssh_known_host.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a Bitbucket Pipeline Ssh Known Host resource.

This allows you to manage your Pipeline Ssh Known Hosts for a repository.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ description: |-

This resource allows you to manage your projects in your bitbucket team.

OAuth2 Scopes: `project` and `project:admin`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Provides a Bitbucket repository resource.
This resource allows you manage your repositories such as scm type, if it is
private, how to fork the repository and other options.

OAuth2 Scopes: `repository`, `repository:admin`, and `repository:delete`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/repository_variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ description: |-

This resource allows you to setup pipelines variables to manage your builds with. Once you have enabled pipelines on your repository you can then further setup variables here to use.

OAuth2 Scopes: `none`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/ssh_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a Bitbucket SSH Key resource.

This allows you to manage your SSH Keys for a user.

OAuth2 Scopes: `account` and `account:write`

## Example Usage

```hcl
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/workspace_hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a Bitbucket workspace hook resource.

This allows you to manage your webhooks on a workspace.

OAuth2 Scopes: `webhook`

## Example Usage

```hcl
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
Expand Down

0 comments on commit e3d132d

Please sign in to comment.