💧 Action Catalogue
See here for a list of available actions to use in your workflows.
bash
Run a bash command and return its output.
Inputs:
command
: The command to run.
Outputs:
stdout
: The standard output of the command.stderr
: The standard error of the command.
comment
Posts a comment on an issue or pull request.
Inputs:
comment
: The body of the comment.issue_number
: The number of the issue or pull request to comment on. Optional, defaults to the pull request.
commit_and_push
Commits and pushes the changes to the current branch.
Inputs:
commit_message
: The commit message. Optional, defaults to "AutoPR commit".filepaths
: The filepaths to commit. Optional, defaults to all files.
list_folder
This action lists all the files and subfolders in a folder, excluding certain files and directories.
Inputs:
folder_path
: The folder to crawl.entries_to_ignore
: Files and subfolders to ignore during the crawl. Optional, defaults to[]
.ignore_binary_files
: Whether to ignore binary files. Optional, defaults toTrue
.
Outputs:
contents
: The list of files in the folder.
insert_content_into_text
This action inserts content into a string at a specified delimiter. If the delimiter occurs only once in the string, the content is appended to the end of the string with delimiters. If the delimiter occurs two or more times, the content is inserted between the last two delimiters.
Inputs:
existing_content
: The existing content of the file/text etc.delimiter
: The delimiter to insert the content after. Example:<!-- tag -->
content_to_add
: The content to insert
Outputs:
content
: The content of the file after the insertion
prompt
Prompt the language model to generate a string.
Inputs:
model
: The model to use to generate the variable. Optional, defaults to "gpt-3.5-turbo-16k".prompt_context
: The context headings that are used to generate the variable. Optional, defaults toNone
.instructions
: The instructions to use to generate the variable. Optional, defaults to""
.prompt
: The prompt to use to generate the variable. Optional, defaults to""
.max_prompt_tokens
: Max tokens to use for the prompt. Optional, defaults to8000
.max_response_tokens
: Max tokens to use for the response. Optional, defaults to2000
.temperature
: The temperature to use for the response. Optional, defaults to0.6
.
Outputs:
result
: The result of the LLM call.
read_file.py
A class representing an action to read the contents of a file.
Inputs:
file_path
: The path to the file to read.ensure_exists
: Whether to raise an error if the file does not exist. Optional, defaults toTrue
.
Outputs:
content
: The contents of the file.success
: Whether the file was read successfully.
write_into_file.py
This action writes content into a file.
Inputs:
filepath
: The path of the file you want to write into.content
: The content to insert.append_at_the_end
: Whether to append the content just to the end of the file, or replace the entire file content. Optional, defaults toTrue
.
Outputs:
success
: If the file was written to successfully.
find_todos.py
Scan through all files in a directory and its subdirectories and returns a list of all annotation tags (TODO, FIXME, ...). Found Annotations are grouped based on their content.
Inputs:
comment
: The comment in which we're going to be looking for annotation tags. Default to"#"
.todo_keywords
: The list of keywords to look for. Defaults to["TODO", "FIXME"]
.
Outputs:
todos
: The list of pydantic models representing the found annotation tags.
publish_issue.py
Publishes or updates issue with the specified title and body.
Inputs:
issue_title
: The title of the issue.issue_body
: The body of the issue.update_if_exists
: Whether to update the issue if it already exists. Optional, defaults toTrue
.
Outputs:
issue_number
: If the issue was successfully created or updated, the number of the issue. Otherwise,None
.