Skip to content
Merged
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
9 changes: 2 additions & 7 deletions docs/automations/integrations/cursor/flag-cursor-pr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ category: [quality, genai, cursor, quickstart]

# Automatically Label Cursor PRs
<!-- --8<-- [start:example]-->
Automatically apply labels to Pull Requests that are assisted by Cursor AI. This automation helps track the impact and usage of Cursor's AI capabilities across your development workflow. You can apply labels based on:

- A known list of Cursor users
- AI-generated code comments
- PR tags
- Inline prompt responses
Automatically apply labels to Pull Requests that are assisted by Cursor AI. This automation helps track the impact and usage of Cursor's AI capabilities across your development workflow.

=== "Label by Prompt"
Prompt PR authors to indicate if they used Cursor for the PR and automatically label the PR if they did. This requires two separate automation files to handle posting the prompt and labeling accordingly.
Expand All @@ -27,7 +22,7 @@ Automatically apply labels to Pull Requests that are assisted by Cursor AI. This

* Post a comment prompting the author to indicate if Cursor assisted the author with writing the code in the PR.

!!! example "Ask the PR author about Cursor usage."
!!! example "Ask the PR author about Cursor usage"
```yaml+jinja
--8<-- "docs/downloads/automation-library/integrations/cursor/comment_cursor_prompt.cm"
```
Expand Down
100 changes: 100 additions & 0 deletions docs/automations/integrations/windsurf/flag-windsurf-pr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: Automation - Label Windsurf PRs
description: Automatically apply labels to PRs that are assisted by Windsurf
category: [quality, genai, windsurf, quickstart]
starter_kits: [genai]
---

# Automatically Label Windsurf PRs
<!-- --8<-- [start:example]-->
Automatically apply labels to PRs that are assisted by Windsurf. You can apply labels based on a known list of Windsurf users, PR tags, or by prompting the PR author to indicate if they used Windsurf.

=== "Label by Prompt"
Prompt PR authors to indicate if they used Windsurf for the PR and automatically label the PR if they did. This requires two separate automation files to handle posting the prompt and labeling accordingly.

![Label Windsurf by Prompt](/automations/integrations/windsurf/flag-windsurf-pr/label-windsurf-by-prompt.png)

!!! info "Configuration Description"
Conditions:

* A PR is created

Automation Actions:

* Post a comment prompting the author to indicate if Windsurf assisted the author with writing the code in the PR.

!!! example "Ask the PR author about Windsurf usage"
```yaml+jinja
--8<-- "docs/downloads/automation-library/integrations/windsurf/comment_windsurf_prompt.cm"
```
<div class="result" markdown>
<span>
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/windsurf/comment_windsurf_prompt.cm){ .md-button }
</span>
</div>

!!! info "Configuration Description"
Conditions:

* A PR is updated or merged where the author indicates they used Windsurf via a prompt.

Automation Actions:

* Apply a `🤖 Windsurf` label to the PR

!!! example "Label PRs where the user indicated Windsurf usage"
```yaml+jinja
--8<-- "docs/downloads/automation-library/integrations/windsurf/label_windsurf_by_prompt.cm"
```
<div class="result" markdown>
<span>
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/windsurf/label_windsurf_by_prompt.cm){ .md-button }
</span>
</div>

=== "Label by Known Users"
Automatically apply labels to PRs that are created by known users of generative AI coding tools.

![Label by Contributors](/automations/integrations/windsurf/flag-windsurf-pr/label-windsurf-by-contributors.png)
!!! info "Configuration Description"
Conditions:

* The PR author is one of a specified list of contributors

Automation Actions:

* Apply a `🤖 Windsurf` label to the PR

!!! example "Label by Contributors"
```yaml+jinja
--8<-- "docs/downloads/automation-library/integrations/windsurf/label_windsurf_by_contributors.cm"
```
<div class="result" markdown>
<span>
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/windsurf/label_windsurf_by_contributors.cm){ .md-button }
</span>
</div>

=== "Label by Tag"
Look for a specific tag in the PR title, description, comments or commit messages and if found add a label to the PR

![Label Windsurf by Tag](/automations/integrations/windsurf/flag-windsurf-pr/label-windsurf-by-tag.png)
!!! info "Configuration Description"
Conditions:

* The `#windsurf#` tag is found in any of the PR title, description, comments or commit messages for commits in the PR

Automation Actions:

* Apply a `🤖 Windsurf` label to the PR

!!! example "Label Windsurf by Tag"
```yaml+jinja
--8<-- "docs/downloads/automation-library/integrations/windsurf/label_windsurf_by_tag.cm"
```
<div class="result" markdown>
<span>
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/windsurf/label_windsurf_by_tag.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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,21 @@
-*- mode: yaml -*-

manifest:
version: 1.0

on:
- pr_created

automations:
comment_windsurf_prompt:
# Post a comment for all PRs to prompt the PR author to indicate whether they used Windsurf to assist coding in this PR
if:
- true
run:
- action: add-comment@v1
args:
comment: |
Please mark whether you used Windsurf to assist coding in this PR

- [ ] Windsurf Assisted
- [ ] Not Windsurf Assisted
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- mode: yaml -*-

manifest:
version: 1.0

automations:
label_windsurf_contributors:
# For all PRs authored by someone who is specified in the windsurf_contributors list
if:
- {{ pr.author | match(list=windsurf_contributors) | some }}
# Apply a label indicating the user has adopted Windsurf
run:
- action: add-label@v1
args:
label: '🤖 Windsurf'

windsurf_contributors:
- username1
- username2
- etc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-*- mode: yaml -*-

manifest:
version: 1.0

automations:
# You should use this automation in conjunction with comment_windsurf_prompt.cm
label_windsurf_pr:
# If the PR author has indicated that they used Windsurf to assist coding in this PR,
# apply a label indicating the PR was supported by Windsurf
if:
- {{ pr.comments | filter(attr='commenter', term='gitstream-cm') | filter (attr='content', regex=r/\- \[x\] Windsurf Assisted/) | some}}
run:
- action: add-label@v1
args:
label: '🤖 Windsurf'
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- mode: yaml -*-

manifest:
version: 1.0

on:
- comment_added
- commit
- pr_created

automations:
label_windsurf:
# Detect PRs that contain the text '#windsurf#' in the title, description, comments, or commit messages
if:
- {{ windsurf_tag.pr_title or windsurf_tag.pr_desc or windsurf_tag.pr_comments or windsurf_tag.commit_messages }}
# Apply a label indicating the user has adopted Windsurf
run:
- action: add-label@v1
args:
label: '🤖 Windsurf'

windsurf_tag:
pr_title: {{ pr.title | includes(regex=r/#windsurf#/) }}
pr_desc: {{pr.description | includes(regex=r/#windsurf#/) }}
pr_comments: {{ pr.comments | map(attr='content') | match(regex=r/#windsurf#/) | some }}
commit_messages: {{ branch.commits.messages | match(regex=r/#windsurf#/) | some }}
8 changes: 6 additions & 2 deletions docs/integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ visible: false
</div>
</div>

<div class="integrations-card" markdown="1">
<div class="integrations-card-title" markdown="1">
[:material-sail-boat: Windsurf](/integrations/windsurf)
</div>
</div>

</div>

## Security & Compliance
Expand Down Expand Up @@ -316,5 +322,3 @@ visible: false
## Additional Resources

--8<-- "docs/snippets/general.md"

--8<-- "docs/snippets/general.md"
15 changes: 15 additions & 0 deletions docs/integrations/windsurf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Integrate gitStream with Windsurf
description: Workflow automations to improve your Windsurf AI usage.
---
# Integrate gitStream with Windsurf

## Automatically Label Windsurf-Assisted PRs

--8<-- "docs/automations/integrations/windsurf/flag-windsurf-pr/README.md:example"

## Additional Resources

--8<-- "docs/snippets/general.md"

--8<-- "docs/snippets/automation-footer.md"