Skip to content

Commit 60f70a3

Browse files
authored
Merge pull request #565 from linear-b/add-generate-pr-desc-automation
added section for Generate PR Description
2 parents 8f76070 + 742c7a9 commit 60f70a3

File tree

5 files changed

+64
-1
lines changed

5 files changed

+64
-1
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Automation - Generate PR Description from Commit Messages
3+
description: Automatically generate Pull Request descriptions based on commit messages.
4+
category: [quality, productivity]
5+
---
6+
# Automatically Generate PR Description from Commit Messages
7+
8+
Automatically generate Pull Request descriptions based on commit messages. This automation helps ensure PR descriptions are consistent and informative.
9+
10+
!!! warning "Required gitStream Plugins"
11+
This example requires you to install the [`generateDescription`](/filter-function-plugins/#generatedescription) plugin.
12+
13+
[Learn more about gitStream plugins](/plugins/).
14+
15+
<div class="automationImage" style="align:right" markdown="1">
16+
![Automatically generate PR descriptions](generate-pr-description-example.png)
17+
</div>
18+
<div class="automationDescription" markdown="1">
19+
!!! info "Configuration Description"
20+
Conditions (all must be true):
21+
22+
* A PR is created or has commits added to it.
23+
24+
Automation Actions:
25+
26+
* Update the PR description with auto-generated content based on commit messages.
27+
</div>
28+
<div class="automationExample" markdown="1">
29+
!!! example "Generate PR Description"
30+
```yaml+jinja
31+
--8<-- "docs/downloads/automation-library/generate_pr_description.cm.cm"
32+
```
33+
<div class="result" markdown>
34+
<span>
35+
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/generate_pr_description.cm.cm"){ .md-button }
36+
</span>
37+
</div>
38+
</div>
39+
40+
## Additional Resources
41+
42+
--8<-- "docs/snippets/general.md"
43+
44+
**Related Automations**:
45+
46+
--8<-- "docs/snippets/context-automation.md::2"
47+
--8<-- "docs/snippets/context-automation.md:4:"
48+
49+
--8<-- "docs/snippets/automation-footer.md"
Loading

plugins/filters/generateDescription/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
??? example "gitStream CM Example: generateDescription"
1616
```yaml+jinja
17-
--8<-- "plugins/filters/generateDescription/auto_pr_description.cm"
17+
--8<-- "plugins/filters/generateDescription/generate_pr_description.cm.cm"
1818
```
1919
<div class="result" markdown>
2020
<span>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
triggers:
2+
exclude:
3+
branch:
4+
- r/dependabot/
5+
6+
automations:
7+
generate_pr_desc:
8+
if:
9+
- true
10+
run:
11+
- action: update-description@v1
12+
args:
13+
description: |
14+
{{ branch | generateDescription(pr, repo, source) }}

0 commit comments

Comments
 (0)