-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #565 from linear-b/add-generate-pr-desc-automation
added section for Generate PR Description
- Loading branch information
Showing
5 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: Automation - Generate PR Description from Commit Messages | ||
description: Automatically generate Pull Request descriptions based on commit messages. | ||
category: [quality, productivity] | ||
--- | ||
# Automatically Generate PR Description from Commit Messages | ||
|
||
Automatically generate Pull Request descriptions based on commit messages. This automation helps ensure PR descriptions are consistent and informative. | ||
|
||
!!! warning "Required gitStream Plugins" | ||
This example requires you to install the [`generateDescription`](/filter-function-plugins/#generatedescription) plugin. | ||
|
||
[Learn more about gitStream plugins](/plugins/). | ||
|
||
<div class="automationImage" style="align:right" markdown="1"> | ||
![Automatically generate PR descriptions](generate-pr-description-example.png) | ||
</div> | ||
<div class="automationDescription" markdown="1"> | ||
!!! info "Configuration Description" | ||
Conditions (all must be true): | ||
|
||
* A PR is created or has commits added to it. | ||
|
||
Automation Actions: | ||
|
||
* Update the PR description with auto-generated content based on commit messages. | ||
</div> | ||
<div class="automationExample" markdown="1"> | ||
!!! example "Generate PR Description" | ||
```yaml+jinja | ||
--8<-- "docs/downloads/automation-library/generate_pr_description.cm.cm" | ||
``` | ||
<div class="result" markdown> | ||
<span> | ||
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/generate_pr_description.cm.cm"){ .md-button } | ||
</span> | ||
</div> | ||
</div> | ||
|
||
## Additional Resources | ||
|
||
--8<-- "docs/snippets/general.md" | ||
|
||
**Related Automations**: | ||
|
||
--8<-- "docs/snippets/context-automation.md::2" | ||
--8<-- "docs/snippets/context-automation.md:4:" | ||
|
||
--8<-- "docs/snippets/automation-footer.md" |
Binary file added
BIN
+80.3 KB
docs/automations/generate-pr-description/generate-pr-description-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
plugins/filters/generateDescription/generate_pr_description.cm.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
triggers: | ||
exclude: | ||
branch: | ||
- r/dependabot/ | ||
|
||
automations: | ||
generate_pr_desc: | ||
if: | ||
- true | ||
run: | ||
- action: update-description@v1 | ||
args: | ||
description: | | ||
{{ branch | generateDescription(pr, repo, source) }} |