Skip to content

Commit

Permalink
Merge pull request #510 from linear-b/fix-examples-syntax-issues
Browse files Browse the repository at this point in the history
fix wrong indentation
  • Loading branch information
vim-zz committed May 11, 2024
2 parents 95eef16 + 0241f46 commit b367f50
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions docs/automations/assign-team-members-as-reviewers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ You can also omit the `| first` filter to assign all teams the owner is member o

!!! example "name"
```yaml+jinja
--8<-- "docs/downloads/automation-library/name.cm"
--8<-- "docs/downloads/automation-library/assign-team-to-prs-by-their-member.cm"
```
<div class="result" markdown>
<span>
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/name.cm){ .md-button }
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/assign-team-to-prs-by-their-member.cm){ .md-button }
</span>
</div>

Expand Down
7 changes: 4 additions & 3 deletions docs/automations/integrations/jira/configure/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Prerequisite configurations for Jira
description: Learn how to configure gitStream to integrate with Jira.
visible: false
---
# Configure Jira for gitStream Integrations

Expand All @@ -13,10 +14,10 @@ If you want to build gitStream automations to interact with the Jira API or Jira

<a target="_blank" href="https://www.atlassian.com/software/jira/features/automation">Jira automations</a> are the preferred method for gitStream to trigger actions within Jira, so you should use them whenever possible. If webhooks don't provide access to the data you need, or acheive the functionality you want, use the Jira API instead.

First, create a Jira automation that uses an incoming webhook as the trigger and add whatever automation components you want after this trigger. Save the webhook URL in a secure place, you'll need it later.
First, create a Jira automation that uses an incoming webhook as the trigger and add whatever automation components you want after this trigger. Save the webhook URL in a secure place, you'll need it later.

Here is an example of an automation that uses the `webhookData` property of the incoming data payload to create a new task. It expects the incoming data payload to contain `title` and `pr_url` fields to set the task summary and a `pr_url` custom field our demo environment already has configured.

![Jira Automation Example - Create task from incoming webhook](/automations/integrations/jira/configure/jira-webhook-automation.png)

<a target="_blank" href="https://confluence.atlassian.com/jirakb/working-with-incoming-webhook-data-in-automation-for-jira-1125878776.html"> Learn more about working with incoming webhooks in the Jira docs </a>
Expand Down
1 change: 1 addition & 0 deletions docs/automations/languages/html/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Automation - Integrate gitStream with HTML and CSS
description: Use gitStream for HTML/CSS project workflow automations.
category: [html, css]
visible: false
---

## Request Changes for CSS Important Tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- pr_created
- commit

# Optionally, you can change pr.target to branch.name
# Optionally, you can change pr.target to branch.name
# if you want to trigger based on the source branch name rather then the target branch name.
automations:
skip_github_action_branch:
Expand All @@ -21,4 +21,4 @@ automations:
- action: add-comment@v1
args:
comment: |
[gitStream](https://docs.gitstream.cm) automatically skipped staging CI pipelines because this PR targets the release branch.
[gitStream](https://docs.gitstream.cm) automatically skipped staging CI pipelines because this PR targets the release branch.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ automations:
- action: add-comment@v1
args:
comment: |
[gitStream](https://docs.gitstream.cm) automatically skipped production CI pipelines because this is labeled for experimental release.
[gitStream](https://docs.gitstream.cm) automatically skipped production CI pipelines because this is labeled for experimental release.
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ automations:
- action: add-comment@v1
args:
comment: |
[gitStream](https://docs.gitstream.cm) automatically skipped production CI pipelines because this PR only contains docs changes.
[gitStream](https://docs.gitstream.cm) automatically skipped production CI pipelines because this PR only contains docs changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ manifest:

automations:
send_slack_security:
# use your custom logic here to determine whether this needs a security review
if:
# use your custom logic here to determine whether this needs a security review
- true
run:
- action: send-slack-message@v1
args:
webhook_url: "{{ env.SLACK_WEBHOOK_SECURITY }}"
message: "A PR requires a security review. See https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/{{ pr.number }}"
send_slack_qa:
send_slack_qa:
# use your custom logic here to determine whether this needs a qa review
if:
# use your custom logic here to determine whether this needs a qa review
- {{ not (files | match(regex=r/(test|spec)/) | some) }}
run:
- action: send-slack-message@v1
args:
webhook_url: "{{ env.SLACK_WEBHOOK_QA }}"
message: "A PR was submitted without tests. See https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/{{ pr.number }}"
send_slack_docs:
send_slack_docs:
# use your custom logic here to determine whether this needs a docs review
if:
# use your custom logic here to determine whether this needs a docs review
- {{ files | match(regex=r/(docs)/) | some }}
run:
- action: send-slack-message@v1
args:
webhook_url: "{{ env.SLACK_WEBHOOK_DOCS }}"
message: "A PR has modified the docs. See https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/{{ pr.number }}"
message: "A PR has modified the docs. See https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/{{ pr.number }}"
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ automations:
- action: send-http-request@v1
args:
url: "{{ env.ZAPIER_WEBHOOK }}"
method: "POST"
headers: '{"Content-type": "application/json"}'
method: "POST"
headers: '{"Content-type": "application/json"}'
body: '{ "reviewers": "{{ pr.reviewers }}" }'
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ automations:
{%- endfor -%}
{%- endif %}
- action: add-reviewers@v1
args:
args:
reviewers: {{ item.owner }}
team_reviewers: {{ item.team }}
{% endfor %}
Expand All @@ -46,8 +46,8 @@ automations:
watchers:
- owner: juliaspencer
files:
- src/auth
- src/auth
- team: release
files:
- package.json
- yarn.lock
- package.json
- yarn.lock

0 comments on commit b367f50

Please sign in to comment.