Skip to content

adding slash commands #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: gitStream Automation - Auto-assign Reviewers Using a Slash Command.
description: Automatically Auto-assign reviewers using a slash command.
---
# Auto-assign Reviewers Using a Slash Command

<!-- --8<-- [start:example]-->
Automatically Auto-assign reviewers using a slash command.

![Review Auto-assign Slash Command](/automations/standard/slash-commands/review-auto-assign-slash-command/review-auto-assign-slash-command.png)

!!! info "Configuration Description"

**Conditions (all must be true):**

* The PR has a comment that contains the term '/gitstream auto-assign'.

**Automation Actions:**

* Dispatch the Github action workflow mentioned in the term.

<div class="automationExample" markdown="1">
!!! example "Auto-assign Reviewers Using a Slash Command"
```yaml+jinja
--8<-- "docs/downloads/automation-library/standard/slash-commands/review-auto-assign-slash-command/review_auto_assign_slash_command.cm"
```
<div class="result" markdown>
<span>
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/standard/slash-commands/review-auto-assign-slash-command/review_auto_assign_slash_command.cm){ .md-button }
</span>
</div>
<!-- --8<-- [end:example]-->

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: gitStream Automation - Dispatch GitHub Actions Based on a Slash Command
description: Automatically dispatch gitHub actions workflow based on a slash command.
---
# Review Slash Commands and Dispatch GitHub Actions

<!-- --8<-- [start:example]-->
Automatically dispatch gitHub actions workflow based on a slash command.

![Review GitHub Actions Slash Command](/automations/standard/slash-commands/review-dispatch-github-action-slash-command/review-dispatch-github-action-slash-command.png)

!!! info "Configuration Description"

**Conditions (all must be true):**

* The PR has a comment that contains the term '/gitstream dispatch <action-name>'.

**Automation Actions:**

* Dispatch the Github action workflow mentioned in the term.

<div class="automationExample" markdown="1">
!!! example "Review Slash Commands and Dispatch GitHub Actions"
```yaml+jinja
--8<-- "docs/downloads/automation-library/standard/slash-commands/review-dispatch-github-action-slash-command/review_dispatch_github_action_slash_command.cm"
```
<div class="result" markdown>
<span>
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/standard/slash-commands/review-dispatch-github-action-slash-command/review_dispatch_github_action_slash_command.cm){ .md-button }
</span>
</div>
<!-- --8<-- [end:example]-->

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
manifest:
version: 1.0

on:
- comment_added

automations:
review_auto_assign_slash_command:
if:
- {{ is.requested }}
run:
- action: add-reviewers@v1
args:
reviewers: [codergig3]
is:
requested: {{ pr.comments | match(attr='content', term='/gitstream auto-assign') | some }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
manifest:
version: 1.0

on:
- comment_added

automations:
review_dispatch_github_action_slash_command:
if:
- {{ is.requested }}
run:
- action: run-github-workflow@v1
args:
workflow: .github/workflows/deploy.yml
is:
requested: {{ pr.comments | match(attr='content', term='/gitstream dispatch deploy') | some }}