Skip to content

add ai generated desc to description #577

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
6 changes: 4 additions & 2 deletions .cm/ask-ai.cm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ automations:
if:
- true
run:
- action: add-comment@v1
- action: update-description@v1
args:
comment: "{{ source | askAI("based on the given context, describe in plain english the changes introduced in this PR.", env.OPEN_AI_TOKEN) | prependTitle("gitStream Describe PR") | encode }}"
concat_mode: append
description: |
"{{ source | askAI("based on the given context, describe in plain english the changes introduced in this PR.", env.OPEN_AI_TOKEN) | prependTitle("✨ /:\ gitStream Describe PR ✨") | encode }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a line before saying something like _the following was added by gitStream askAI plugin_

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prepend_title does something like that

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you say it is done automatically? I dont think so. Or do you mention it as a reference for such behavior?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's done by piping the output of the filter to prependTitle (another plugin that adds a prefix markdown title)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per @MishaKav: updateTitle doesn't support encoded data, yet.