Skip to content

Commit e3d132d

Browse files
authored
Merge pull request #78 from DrFaust92/scopes
Scopes Docs
2 parents 76a7be3 + db78206 commit e3d132d

29 files changed

+61
-27
lines changed

.github/workflows/documentation.yml

+3-19
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
markdown-link-check:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919
- uses: gaurav-nelson/github-action-markdown-link-check@v1
2020
with:
2121
use-quiet-mode: 'yes'
@@ -26,25 +26,9 @@ jobs:
2626
markdown-lint:
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v3
3030
- uses: avto-dev/markdown-lint@v1
3131
with:
3232
config: '.markdownlint.yml'
3333
args: 'docs'
34-
misspell:
35-
runs-on: ubuntu-latest
36-
steps:
37-
- uses: actions/checkout@v2
38-
# See also: https://github.com/actions/setup-go/pull/62
39-
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
40-
- uses: actions/setup-go@v2
41-
with:
42-
go-version: ${{ env.GO_VERSION }}
43-
- uses: actions/cache@v2
44-
continue-on-error: true
45-
timeout-minutes: 2
46-
with:
47-
path: ~/go/pkg/mod
48-
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
49-
- run: go install github.com/client9/misspell/cmd/misspell
50-
- run: misspell -error -source text docs/
34+

.github/workflows/lint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
name: Run linter
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/setup-go@v2
10+
- uses: actions/setup-go@v3
1111
with:
1212
go-version: '1.18'
1313
- uses: actions/checkout@v3
1414
- name: golangci-lint
15-
uses: golangci/golangci-lint-action@v2
15+
uses: golangci/golangci-lint-action@v3
1616
with:
17-
version: v1.45.2
17+
version: v1.46.2
1818
only-new-issues: true

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
steps:
2121
-
2222
name: Checkout
23-
uses: actions/checkout@v2.4.0
23+
uses: actions/checkout@v3
2424
-
2525
name: Unshallow
2626
run: git fetch --prune --unshallow
2727
-
2828
name: Set up Go
29-
uses: actions/setup-go@v2
29+
uses: actions/setup-go@v3
3030
with:
31-
go-version: 1.18
31+
go-version: '1.18'
3232
-
3333
name: Import GPG key
3434
id: import_gpg
@@ -39,7 +39,7 @@ jobs:
3939
PASSPHRASE: ${{ secrets.PASSPHRASE }}
4040
-
4141
name: Run GoReleaser
42-
uses: goreleaser/goreleaser-action@v2.8.0
42+
uses: goreleaser/goreleaser-action@v3
4343
with:
4444
version: latest
4545
args: release --rm-dist

.go-version

-1
This file was deleted.

docs/data-sources/current_user.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Provides a way to fetch data of the current user.
1212

13+
OAuth2 Scopes: `account`
14+
1315
## Example Usage
1416

1517
```hcl

docs/data-sources/hook_types.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Provides a way to fetch data of hook types.
1212

13+
OAuth2 Scopes: `none`
14+
1315
## Example Usage
1416

1517
```hcl

docs/data-sources/ip_ranges.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Provides a way to fetch IP Ranges for whitelisting.
1212

13+
OAuth2 Scopes: `none`
14+
1315
## Example Usage
1416

1517
```hcl

docs/data-sources/pipeline_oidc_config.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

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

13+
OAuth2 Scopes: `none`
14+
1315
## Example Usage
1416

1517
```hcl

docs/data-sources/pipeline_oidc_config_keys.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

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

13+
OAuth2 Scopes: `none`
14+
1315
## Example Usage
1416

1517
```hcl

docs/data-sources/workspace.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Provides a way to fetch data on a workspace.
1212

13+
OAuth2 Scopes: `none`
14+
1315
## Example Usage
1416

1517
```hcl

docs/data-sources/workspace_members.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

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

13+
OAuth2 Scopes: `account`
14+
1315
## Example Usage
1416

1517
```hcl

docs/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,7 @@ The following arguments are supported in the `provider` block:
4949

5050
* `oauth_token` - (Optional) Your password used to connect to bitbucket. You can
5151
also set this via the environment variable. `BITBUCKET_OAUTH_TOKEN`
52+
53+
## OAuth2 Scopes
54+
55+
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.

docs/resources/branch_restriction.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Provides a Bitbucket branch restriction resource.
1212

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

15+
OAuth2 Scopes: `repository:admin`
16+
1517
## Example Usage
1618

1719
```hcl

docs/resources/branching_model.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Provides a Bitbucket branching model resource.
1212

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

15+
OAuth2 Scopes: `repository:admin`
16+
1517
## Example Usage
1618

1719
```hcl

docs/resources/default_reviewers.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
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.
1212

13+
OAuth2 Scopes: `pullrequest` and `repository:admin`
14+
1315
## Example Usage
1416

1517
```hcl

docs/resources/deploy_key.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Provides a Bitbucket Deploy Key resource.
1212

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

15+
OAuth2 Scopes: `repository` and `repository:admin`
16+
1517
## Example Usage
1618

1719
```hcl

docs/resources/deployment.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ description: |-
1111

1212
This resource allows you to setup pipelines deployment environments.
1313

14+
OAuth2 Scopes: `none`
15+
1416
## Example Usage
1517

1618
```hcl

docs/resources/deployment_variable.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ description: |-
1111

1212
This resource allows you to configure deployment variables.
1313

14+
OAuth2 Scopes: `none`
15+
1416
## Example Usage
1517

1618
```hcl

docs/resources/forked_repository.md

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ private, how to fork the repository and other options. SCM cannot be overridden,
1515
as it is inherited from the parent repository. Creation will fail if the parent
1616
repo has `no_forks` as its fork policy.
1717

18+
OAuth2 Scopes: `repository`, `repository:admin`, and `repository:delete`
19+
1820
## Example Usage
1921

2022
```hcl

docs/resources/hook.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Provides a Bitbucket hook resource.
1212

1313
This allows you to manage your webhooks on a repository.
1414

15+
OAuth2 Scopes: `webhook`
16+
1517
## Example Usage
1618

1719
```hcl

docs/resources/pipeline_schedule.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Provides a Bitbucket Pipeline Schedule resource.
1212

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

15+
OAuth2 Scopes: `none`
16+
1517
## Example Usage
1618

1719
```hcl

docs/resources/pipeline_ssh_key.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Provides a Bitbucket Pipeline Ssh Key resource.
1212

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

15+
OAuth2 Scopes: `none`
16+
1517
## Example Usage
1618

1719
```hcl

docs/resources/pipeline_ssh_known_host.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Provides a Bitbucket Pipeline Ssh Known Host resource.
1212

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

15+
OAuth2 Scopes: `none`
16+
1517
## Example Usage
1618

1719
```hcl

docs/resources/project.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ description: |-
1111

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

14+
OAuth2 Scopes: `project` and `project:admin`
15+
1416
## Example Usage
1517

1618
```hcl

docs/resources/repository.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Provides a Bitbucket repository resource.
1313
This resource allows you manage your repositories such as scm type, if it is
1414
private, how to fork the repository and other options.
1515

16+
OAuth2 Scopes: `repository`, `repository:admin`, and `repository:delete`
17+
1618
## Example Usage
1719

1820
```hcl

docs/resources/repository_variable.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ description: |-
1111

1212
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.
1313

14+
OAuth2 Scopes: `none`
15+
1416
## Example Usage
1517

1618
```hcl

docs/resources/ssh_key.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Provides a Bitbucket SSH Key resource.
1212

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

15+
OAuth2 Scopes: `account` and `account:write`
16+
1517
## Example Usage
1618

1719
```hcl

docs/resources/workspace_hook.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Provides a Bitbucket workspace hook resource.
1212

1313
This allows you to manage your webhooks on a workspace.
1414

15+
OAuth2 Scopes: `webhook`
16+
1517
## Example Usage
1618

1719
```hcl

go.sum

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
6262
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
6363
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
6464
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
65+
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
6566
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
6667
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
6768
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=

0 commit comments

Comments
 (0)