Run AI-powered workflows over your codebase
๐ณ Living summaries of your code in nested READMEs
๐ TODOs kept track of in issues
โณ Keep history of an API call's result in git
๐ Summarize changes by adding a "summarize" label to a PR
๐ซต Custom actions configured in YAML
Please see the installation guide.
Though used internally, this project is currently not actively maintained.
Until v0.1.2, AutoPR autonomously generated pull requests from issues. There's another actively maintained open-source (AGPL) solution for this use case โ Sweep. If you'd still prefer to use AutoPR for this, set the following line in your github actions yaml:
uses: docker://ghcr.io/irgolic/autopr:v0.1.2
Below is an example of AutoPR's Living README:
This folder contains files and folders related to an autonomous agent system. The Dockerfile sets up a Docker image and installs dependencies using Poetry. The LICENSE.md file contains the MIT License for the software. The Makefile is used for automating development tasks. The action.yml file configures an automatic pull request workflow. The autopr folder contains Python files and folders for the autonomous agent system. The entrypoint.sh file is a shell script that sets up Git and activates a virtual environment. The poetry.lock file provides an executive summary of the project. The pyproject.toml file is a configuration file for the Python project. The strict_workflow_schema.json file defines a strict workflow structure. The trigger_schema.json file defines trigger configurations. The workflow_schema.json file defines a workflow structure.
Dockerfile
๐๏ธ Sets up a Docker image based on the duffn/python-poetry:3.9-bullseye
image
๐ง Installs git from the bullseye-backports repository
๐ฅ Copies an entrypoint script and makes it executable
๐ฅ Copies the pyproject.toml
and poetry.lock
files
๐ง Activates the virtual environment and installs the project dependencies using Poetry
๐ฅ Copies the rest of the files to the /app
directory
๐ง Installs the application using Poetry
๐ Sets the entrypoint to /entrypoint.sh
for running the app
LICENSE.md
๐ This file contains the MIT License.
๐ The license grants permission to use, modify, and distribute the software.
๐ The license requires the copyright notice and permission notice to be included in all copies.
๐ซ The software is provided "as is" without warranty.
๐
The license is valid until 2023.
๐ผ The license is owned by Raphael Francis Ltd.
Makefile
๐ This file is a makefile-like configuration file.
๐ง It defines various targets and their associated commands.
๐ป The targets are: format
, type
, test
, schema
, and all
.
๐ง The format
target runs a command to format code using the black
tool.
๐ง The type
target runs a command to perform type checking using pyright
.
๐ง The test
target runs pytest on the autopr/tests
directory.
๐ง The schema
target runs a command to generate configuration entrypoints using autopr.models.config
.
๐ง The all
target runs all the targets in sequence: format
, type
, test
, and schema
.
๐ง This file is meant to automate common development tasks and ensure code quality.
action.yml
๐ This file is a configuration file for an automatic pull request workflow.
๐ง It specifies the details for running the workflow, such as the Docker image to use.
๐จ It also includes branding information, such as the icon and color to use.
๐ The file defines inputs required for the workflow, such as the GitHub token and base branch.
๐ฅ It includes a default loading GIF URL to display while the pull request is being generated.
๐ฟ The file defines a template for the name of the target branch.
๐ It specifies whether to overwrite existing branches and pull requests when creating from issues.
autopr/
This folder contains a collection of Python files and folders related to an autonomous agent system. The "actions" folder contains various Python files that implement different actions for the system, such as running commands, generating choices, and making API calls. The "gh_actions_entrypoint.py" file is the entry point for a GitHub Actions workflow and handles the execution of the workflow. The "log_config.py" file is used to configure logging settings. The "main.py" file serves as the main entry point for the application and handles triggers and workflows. The "models" folder contains data models for messages, issues, and pull requests. The "services" folder contains implementations of different services for a pull request workflow system. The "triggers.py" file retrieves trigger configurations from specified files. The "workflows" folder contains YAML files that define different workflows for automation.
entrypoint.sh
๐ The file is a shell script
๐ง It sets the Git configuration for a specific directory
โ๏ธ It sets the user email and name for Git commits
๐ฆ It activates a virtual environment
๐ It runs a Python module called autopr.gh_actions_entrypoint
poetry.lock
๐ This file is an executive summary of a project or report
๐ It provides a high-level overview of the main points
๐ It highlights key findings, conclusions, and recommendations
๐ It may include a summary of data or analysis
๐ฅ It is intended for someone who is new to the project or report
๐ซ It does not include trivial details or technical explanations
๐ก It gives a clear understanding of the purpose and scope of the project
๐ It provides a quick glance at the content without going into depth
๐ผ It serves as a starting point for further exploration or discussion
๐ It is concise and easy to read, even if the file is empty
pyproject.toml
๐ This file is a configuration file for a Python project using Poetry.
๐ It contains information about the project's name, version, and authors.
๐ The license of the project is specified as MIT.
๐ฆ It lists the packages and their dependencies required for the project.
๐งช There are separate dependencies for testing and development.
๐ง The build system used is Poetry.
๐ The file also includes configuration for the Pyright static type checker.
๐ It specifies the line length and target version for the Black code formatter.
strict_workflow_schema.json
๐ The file is a JSON schema describing a strict workflow definition.
๐ It defines various actions that can be performed within the workflow.
๐ Actions include commenting, setting issue titles, walking files, making API calls, running bash commands, and more.
๐ Each action has its own set of inputs and outputs.
๐ The workflow steps are defined as an array of actions.
๐ The schema also includes definitions for various data types and declarations used within the actions.
๐ The purpose of the file is to provide a standardized structure for defining and executing strict workflows.
๐๏ธ The schema can be used to validate and ensure the correctness of workflow definitions.
๐งฉ It allows for easy integration with other tools and systems that support the schema.
๐ The file can serve as a reference for understanding the structure and capabilities of strict workflows.
trigger_schema.json
๐ This file contains a JSON schema definition for a trigger configuration in a workflow.
๐ The TopLevelTriggerConfig
object is the main entry point for defining triggers.
๐ Triggers can be of different types: LabelTrigger
, CommentTrigger
, PushTrigger
, and CronTrigger
.
๐ Each trigger type has its own set of properties and sub-objects that define the trigger behavior.
๐ก Triggers can perform various actions such as commenting, setting issue titles, walking files, making API calls, executing bash commands, and more.
๐ Some trigger actions can be performed iteratively with the help of the IterableActionModel
objects.
๐ The CronTrigger
type allows triggers to be scheduled based on a cron schedule.
๐ The schema also defines several supporting objects and models used within the trigger configuration.
๐ The definitions
section of the schema provides detailed definitions for each object and model.
๐ The schema enforces additionalProperties to be false, ensuring strict adherence to the defined structure.
workflow_schema.json
๐ This file is a JSON schema definition for a workflow definition.
๐ง It defines various types and properties for different actions and declarations used in the workflow.
๐ The schema includes definitions for actions like commenting, setting issue title, walking files, making API calls, running bash commands, etc.
๐ It also defines different types of declarations like template, variable, constant, and lambda declarations.
๐ The workflow definition includes a name, description, inputs, and outputs.
๐ข It consists of a list of steps which can be actions, workflow invocations, or conditional statements.
๐ Conditional statements can have if-else branches and support different conditions like lambda expressions and context checks.
๐ Workflow invocations can be either regular or iterable.
๐ Overall, this file provides a structured definition for creating and executing workflows with various actions and conditions.