Skip to content

Commit a93f994

Browse files
authored
Support for Bitbucket (#36)
1 parent 57cbb2c commit a93f994

35 files changed

Lines changed: 3185 additions & 1052 deletions

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
dist
2-
node_modules
2+
node_modules
3+
README.md

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Supported SCM platforms:
2929

3030
- GitHub
3131
- GitLab
32+
- Bitbucket Cloud
3233

3334
Supported entry points
3435

@@ -81,7 +82,7 @@ You are good to go! You can also pin the extension to the toolbar for easy acces
8182

8283
- Open a commit or merge request on your SCM platform. Open the extension popup dialog
8384
- Select the correct platform type and add the host
84-
- Go to the options e.g., via click on the cog-wheel icon
85+
- You will be redirected to the options page, where the configuration dialog opens up
8586
- Now enter your API token
8687

8788
- ⚠️Don\'t give the token all permissions, use fine-grained personal access tokens (if possible) ⚠️
@@ -100,22 +101,38 @@ You are good to go! You can also pin the extension to the toolbar for easy acces
100101
3. Select `Personal access tokens` - `Fine-grained tokens`
101102
4. Select `Generate new token`
102103
5. Set `Repository access` as desired. If you give access to non-public repositories, make sure to grant `Repository permissions` for `Content` (read-only) and `Pull requests` (read-only)
103-
- GitLab 1. Go to `Settings` - `Access tokens` in the relevant group or repository 2. Select `Add new token` 3. Set **Scope** to `read_api`, select a **Role** that is allowed to access code and changes
104+
- GitLab
105+
1. Go to `Settings` - `Access tokens` in the relevant group or repository
106+
2. Select `Add new token`
107+
3. Set **Scope** to `read_api`, select a **Role** that is allowed to access code and changes
108+
- Bitbucket Cloud
109+
- Personal access tokens
110+
1. Log in to https://id.atlassian.com/manage-profile/security/api-tokens.
111+
2. Select **Create API token with scopes**.
112+
3. Select **`read:repository:bitbucket`** and **`read:pullrequest:bitbucket`** scopes.
113+
>*When using a Bitbucket personal access token, you must also provide the email address that belongs to the token in the extension’s configuration dialog.*
114+
- Workspace/Project/Repository access tokens
115+
1. At https://bitbucket.org, navigate to the workspace, project or repository that you want the token to have access to.
116+
2. Open the corresponding **workspace**, **project** or **repository settings**.
117+
3. On the sidebar, under **Security**, select **Access tokens**.
118+
4. Select **Create access tokens**.
119+
5. Select **`repository`** and **`pullrequest`** permissions.
104120
</details>
105-
<img style="display: block; alight: left" src="./docs/images/firefox/configuration.png" alt="Configuration" width="800"/>
121+
<img style="display: block; alight: left" src="./docs/images/chrome/add_host_dialog.png" alt="Add host dialog" width="600"/>
122+
<img style="display: block; alight: left" src="./docs/images/chrome/configuration.png" alt="Configuration" width="600"/>
106123

107124
- Save the settings
108125
- Go back to the commit page and open the popup again
109126
- The supported files of the changes will be listed
110127
- Files that cannot be diffed with the ecu.test Diff-Viewer can still be opened individually for both the old and new versions
111128
- Click on a file and click on "Show new" or "Show old"
112129

113-
<img style="display: block; alight: left" src="./docs/images/firefox/dialog_download.png" alt="Configuration Download" width="600"/>
130+
<img style="display: block; alight: left" src="./docs/images/chrome/dialog_download.png" alt="Configuration Download" width="600"/>
114131

115132
- Files supported by the ecu.test Diff-Viewer will open directly in the viewer
116133
- Click on a file and click on "Show diff"
117134

118-
<img style="display: block; alight: left" src="./docs/images/firefox/dialog.png" alt="Configuration" width="600"/>
135+
<img style="display: block; alight: left" src="./docs/images/chrome/dialog.png" alt="Configuration" width="600"/>
119136

120137
- ecu.test Diff-Viewer will be opened
121138

docs/DeveloperGuide.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Open the ecu.test diff project in your IDE of choice and run the following termi
5151

5252
If you want to build the ecu.test diff extension locally for development purposes or for production use, you have access to different scripts:
5353

54-
**<u>Note:</u>** All of these scripts can be found and modified within the './package.json' of the project.
54+
**<u>Note:</u>** All of these scripts can be found and modified within the `./package.json` of the project.
5555

5656
**Firefox:**
5757

@@ -72,22 +72,11 @@ Your compiled files are available inside the `./dist` folder after the build pro
7272

7373
## Integration
7474

75-
For integration and testing into your browser, you have to note some differences:
75+
You can integrate and test the local extension in your browsers:
7676

77-
In **Chrome/Edge** you can select the `./dist` folder inside you browser windows for importing the extension.
78-
79-
In **Firefox**, you can test the extension only in debug-mode.
80-
You have to klick on 'debug add-ons' and can afterward select a .zip file for the import.
81-
You can create the .zip file on your own or use the tool web-ext (from mozilla).
82-
83-
```
84-
npm install web-ext
85-
cd ./dist
86-
web-ext build
87-
```
88-
89-
This tooling also provides help in the [signing process](https://extensionworkshop.com/documentation/develop/extensions-and-the-add-on-id/)
90-
which is required for the use of add-ons without a debug-mode in firefox.
77+
- To load the local extension you need required rights (probably managed by your IT department). The browser will probably inform you if you are not allowed to contents apart from the official stores.
78+
- In **Chrome/Edge** you can load the extension on the [extensions page](chrome://extensions/). The slider `Developer mode` on the upper right has to be activated. Then, you can click on the button `Load unpacked` and select the `./dist` folder.
79+
- In **Firefox**, you can load the extension on the [debugging page](about:debugging#/runtime/this-firefox) (follow this link or click on 'debug add-ons' when managing addons). Click on the button `Load Temporary Add-on` and select a typical file in `./dist` folder, e.g. `./dist/manifest.json`.
9180

9281
## Testing / Linting / Code formatting
9382

@@ -100,7 +89,7 @@ Select the files you want to format and run the following command:
10089

10190
```bash
10291
# check all files
103-
npm prettier:check
92+
npm run prettier:check
10493

10594
# fix findings for all files
10695
npm run prettier:write .
@@ -192,6 +181,17 @@ See the following store-specific information, to handle release specification in
192181
- a mozilla developer account is required
193182
- any secrets that are necessary for the publication process are set as `Actions secret`
194183
- any additional information, see [Submitting an add-on](https://extensionworkshop.com/documentation/publish/submitting-an-add-on/)
184+
- _Note_:
185+
- The tool `web-ext` (from mozilla) will help you in the [signing process](https://extensionworkshop.com/documentation/develop/extensions-and-the-add-on-id/) which is required for the use of add-ons without a debug-mode in firefox.
186+
187+
For example, install it globally.
188+
189+
```
190+
npm install web-ext -g
191+
cd ./dist
192+
web-ext build
193+
```
194+
195195
- after publishing the application, a review is usually pending and will be published afterward
196196
- _Note_:
197197
- the add-on may be subject to additional review.
21.5 KB
Loading
-48.3 KB
Loading

docs/images/chrome/dialog.png

1.63 KB
Loading
-22.6 KB
Loading

0 commit comments

Comments
 (0)