Skip to content

Commit 9beb554

Browse files
committed
added logos and pipeline
1 parent 17ee264 commit 9beb554

File tree

5 files changed

+122
-16
lines changed

5 files changed

+122
-16
lines changed

docs/automation-actions.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,28 @@ Actions are the end results of the automation described in your `.cm` file.
1212

1313
- :fontawesome-brands-github: Supported on GitHub
1414
- :fontawesome-brands-gitlab: Supported on GitLab
15+
- :fontawesome-brands-bitbucket: Supported on Bitbucket
1516
- :fontawesome-solid-flask: Open beta - Feature is under development and currently available for all
1617

1718
## Overview
1819

1920
[`send-http-request`](#send-http-request) is executed immediately after the evaluation of the condition.
2021
For all other actions, gitStream executes the actions in the order they are listed per automation. If an action result fails, the following actions will not be executed.
2122

22-
- [`add-comment`](#add-comment) :fontawesome-brands-github: :fontawesome-brands-gitlab:
23+
- [`add-comment`](#add-comment) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
2324
- [`add-github-check`](#add-github-check) :fontawesome-brands-github:
2425
- [`add-label`](#add-label) :fontawesome-brands-github: :fontawesome-brands-gitlab:
2526
- [`add-labels`](#add-labels) :fontawesome-brands-github: :fontawesome-brands-gitlab:
26-
- [`add-reviewers`](#add-reviewers) :fontawesome-brands-github: :fontawesome-brands-gitlab:
27+
- [`add-reviewers`](#add-reviewers) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
2728
- [`add-thread`](#add-thread) :fontawesome-brands-gitlab:
28-
- [`approve`](#approve) :fontawesome-brands-github: :fontawesome-brands-gitlab:
29-
- [`close`](#close) :fontawesome-brands-github: :fontawesome-brands-gitlab:
30-
- [`explain-code-experts`](#explain-code-experts) :fontawesome-brands-github: :fontawesome-brands-gitlab:
31-
- [`merge`](#merge) :fontawesome-brands-github: :fontawesome-brands-gitlab:
32-
- [`request-changes`](#request-changes) :fontawesome-brands-github: :fontawesome-brands-gitlab:
29+
- [`approve`](#approve) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
30+
- [`close`](#close) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
31+
- [`explain-code-experts`](#explain-code-experts) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
32+
- [`merge`](#merge) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
33+
- [`request-changes`](#request-changes) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
3334
- [`require-reviewers`](#require-reviewers) :fontawesome-brands-github:
3435
- [`run-github-workflow`](#run-github-workflow) :fontawesome-brands-github:
35-
- [`send-http-request`](#send-http-request) :fontawesome-brands-github:
36+
- [`send-http-request`](#send-http-request) :fontawesome-brands-github: :fontawesome-brands-bitbucket:
3637
- [`send-slack-message`](#send-slack-message) :fontawesome-brands-github:
3738
- [`set-required-approvals`](#set-required-approvals) :fontawesome-brands-github:
3839
- [`update-description`](#update-description) :fontawesome-brands-github:
@@ -60,7 +61,7 @@ automations:
6061

6162
## Reference
6263

63-
#### `add-comment` :fontawesome-brands-github: :fontawesome-brands-gitlab:
64+
#### `add-comment` :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
6465

6566
This action, once triggered, adds a comment to the PR.
6667

@@ -156,7 +157,7 @@ This is a managed action, when a PR updates existing labels that were added by g
156157
</div>
157158

158159

159-
#### `add-reviewers` :fontawesome-brands-github: :fontawesome-brands-gitlab:
160+
#### `add-reviewers` :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
160161

161162
This action, once triggered, sets a specific reviewer.
162163

@@ -236,7 +237,7 @@ automations:
236237
gt: 10
237238
```
238239

239-
#### `approve` :fontawesome-brands-github: :fontawesome-brands-gitlab:
240+
#### `approve` :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
240241

241242
This action, once triggered, approves the PR for merge.
242243

@@ -251,7 +252,7 @@ automations:
251252
- action: approve@v1
252253
```
253254

254-
#### `close` :fontawesome-brands-github: :fontawesome-brands-gitlab:
255+
#### `close` :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
255256

256257
This action, once triggered, close the PR without merging.
257258

@@ -269,7 +270,7 @@ automations:
269270
- action: close@v1
270271
```
271272

272-
#### `merge` :fontawesome-brands-github: :fontawesome-brands-gitlab:
273+
#### `merge` :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
273274

274275
Once triggered, merge the PR if possible. It can be set to wait for all checks to pass or only required ones.
275276

@@ -294,7 +295,7 @@ automations:
294295
rebase_on_merge: true
295296
```
296297

297-
#### `request-changes` :fontawesome-brands-github: :fontawesome-brands-gitlab:
298+
#### `request-changes` :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket:
298299

299300
This action, once triggered, requests changes on the PR. As long as request change is set, gitStream will block the PR merge.
300301

@@ -400,7 +401,7 @@ has:
400401
* This action will invoke the run of a workflow dispatch; thus, it might result in significant GitHub action minutes charge.
401402
* We encourage you to use this action with [custom triggers](./execution-model.md#explicit-triggers)
402403

403-
#### `send-http-request` :fontawesome-brands-github:
404+
#### `send-http-request` :fontawesome-brands-github: :fontawesome-brands-bitbucket:
404405

405406
The action, once triggered, sends an HTTP request to the specified URL
406407
<div class="filter-details" markdown=1>

docs/bitbucket-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Create a `gitstream.cm` rules file in the root directory of your repository's de
3535

3636
!!! example "Example Configuration"
3737
```yaml
38-
--8<-- "docs/downloads/gitstream.cm"
38+
--8<-- "docs/downloads/gitstream-bb.cm"
3939
```
4040

4141
## Create a Bitbucket Pipeline
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Code generated by gitStream - DO NOT EDIT
2+
3+
image: atlassian/default-image:4
4+
5+
pipelines:
6+
# Pipelines that can only be triggered manually
7+
custom:
8+
gitstream:
9+
- variables:
10+
- name: client_payload
11+
description: the client payload
12+
- name: head_ref
13+
description: the head sha
14+
- name: base_ref
15+
description: The base sha
16+
- name: resolver_url
17+
description: the resolver url to pass results to
18+
- name: resolver_token
19+
description: Optional resolver token for resolver service
20+
- name: debug_mode
21+
description: Debug mode
22+
default: 'true'
23+
- name: oauth_token
24+
description: token to do operations in bitbucket
25+
- name: full_repo
26+
description: workspace/repo
27+
- step:
28+
name: /:\ gitstream workflow automation
29+
max-time: 5
30+
clone:
31+
enabled: false
32+
services:
33+
- docker
34+
script:
35+
- git clone https://x-token-auth:[email protected]/$full_repo.git gitstream/repo
36+
- git clone https://x-token-auth:[email protected]/$BITBUCKET_WORKSPACE/$BITBUCKET_REPO_SLUG.git gitstream/cm
37+
- cd gitstream/repo
38+
- git fetch --all
39+
- git checkout $base_ref
40+
- git checkout $head_ref
41+
- docker pull gitstream/rules-engine:latest
42+
- |
43+
docker run -v $BITBUCKET_CLONE_DIR/gitstream:/code \
44+
-e SLACK_PRIVATE_MISHA_CHANNEL_WEBHOOK=$SLACK_PRIVATE_MISHA_CHANNEL_WEBHOOK \
45+
-e HEAD_REF=$head_ref \
46+
-e BASE_REF=$base_ref \
47+
-e CLIENT_PAYLOAD="$client_payload" \
48+
-e RULES_RESOLVER_URL=$resolver_url \
49+
-e RULES_RESOLVER_TOKEN=$resolver_token \
50+
-e DEBUG_MODE=$debug_mode gitstream/rules-engine:latest

docs/downloads/gitstream-bb.cm

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# -*- mode: yaml -*-
2+
# This example configuration provides basic automations to get started with gitStream.
3+
# View the gitStream quickstart for more examples: https://docs.gitstream.cm/examples/
4+
manifest:
5+
version: 1.0
6+
7+
8+
automations:
9+
# Add a comment that indicates how many minutes it will take to review the PR.
10+
estimated_time_to_review:
11+
if:
12+
- true
13+
run:
14+
- action: add-comment@v1
15+
args:
16+
comment: "{{ calc.etr }} min review"
17+
18+
# Inform PR authors when they fail to reference Jira tickets in the PR title or description.
19+
comment_missing_jira_info:
20+
if:
21+
- {{ not (has.jira_ticket_in_title or has.jira_ticket_in_desc) }}
22+
run:
23+
- action: add-comment@v1
24+
args:
25+
comment: |
26+
This PR is missing a Jira ticket reference in the title or description.
27+
Please add a Jira ticket reference to the title or description of this PR.
28+
29+
# Post a comment that lists the best experts for the files that were modified.
30+
explain_code_experts:
31+
if:
32+
- true
33+
run:
34+
- action: explain-code-experts@v1
35+
args:
36+
gt: 10
37+
38+
39+
# +----------------------------------------------------------------------------+
40+
# | Custom Expressions |
41+
# | https://docs.gitstream.cm/how-it-works/#custom-expressions |
42+
# +----------------------------------------------------------------------------+
43+
44+
calc:
45+
etr: {{ branch | estimatedReviewTime }}
46+
47+
has:
48+
jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z]+-\d+\b/) }}
49+
jira_ticket_in_desc: {{ pr.description | includes(regex=r/atlassian.net\/browse\/\w{1,}-\d{3,4}/) }}
50+
51+
colors:
52+
red: 'b60205'
53+
yellow: 'fbca04'
54+
green: '0e8a16'

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ nav:
1111
- Guide:
1212
- GitHub Setup: github-installation.md
1313
- GitLab Setup: gitlab-installation.md
14+
- Bitbucket Setup: bitbucket-installation.md
1415
- Custom GitHub App: custom-github-app.md
1516
- How gitStream works: how-it-works.md
1617
- Your First Automation: quick-start.md

0 commit comments

Comments
 (0)