Skip to content

Commit

Permalink
Merge pull request irgolic#126 from raphael-francis/autopr/2fd12339-9…
Browse files Browse the repository at this point in the history
…909-4716-af45-3a2cf19ee0eb

Merged automatically by AutoPR
  • Loading branch information
github-actions[bot] authored Oct 16, 2023
2 parents 3267121 + 6552f51 commit bc2263b
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 111 deletions.
Binary file modified .autopr/cache/prompt.db
Binary file not shown.
55 changes: 32 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ See below for an example of AutoPR's README summary:
<!-- Living README Summary -->
## 🌳 Living Summary

This folder contains various files and folders related to automation tasks. It includes a Dockerfile for setting up the project environment, a license file outlining the permissions and rights for the software, a Makefile for running different tasks in the project, an action.yml file defining the configuration for an automated pull request action, and several other files related to workflow configurations, data models, and schema definitions. Overall, this folder provides reusable components and configurations for automating different tasks.
This folder contains files and subfolders related to building an autonomous agent system. It includes a Dockerfile for setting up the environment, a Makefile for running different tasks, an action.yml file for configuring an "Automatic Pull Request" action, and various Python files and subfolders for implementing actions, services, models, and workflows. Additionally, there are configuration files for managing dependencies (pyproject.toml and poetry.lock) and JSON schemas for defining workflows and trigger configurations. Overall, this folder provides a comprehensive set of components for building and automating complex tasks or processes in an autonomous agent system.


### [`Dockerfile`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./Dockerfile/)
Expand Down Expand Up @@ -79,9 +79,9 @@ This folder contains various files and folders related to automation tasks. It i



### [`autopr`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/)
### [`autopr/`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/)

This folder contains a collection of Python files and folders that serve different purposes for automation tasks. The "actions" folder contains files that define various actions and utilities for automation, such as running commands, publishing comments, and committing changes. The "models" folder contains files that define models, actions, and configurations for a workflow automation system. The "services" folder contains files that provide services for managing actions, caching, commits, platforms, and workflows. The "workflows" folder contains scripts and files related to workflow configurations. Overall, this folder provides reusable components and configurations for automating different tasks.
This folder contains a collection of Python files and subfolders that implement various actions, services, models, and workflows for an autonomous agent system. The "actions" folder contains files for performing tasks such as running commands, making API calls, and reading/writing files. The "services" folder provides functionalities for managing actions, branches, and pull requests, interacting with the GitHub platform, and executing workflows. The "models" folder defines data models and actions for a workflow system and an automated PR system. The "workflows" folder contains YAML files that define different automation workflows. Overall, this folder provides a comprehensive set of components for building an autonomous agent system.


### [`entrypoint.sh`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./entrypoint.sh/)
Expand Down Expand Up @@ -121,33 +121,42 @@ This folder contains a collection of Python files and folders that serve differe

### [`strict_workflow_schema.json`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./strict_workflow_schema.json/)

📋 This file contains a JSON schema definition for a strict workflow model. The purpose of this file is to define the structure and properties of a workflow, including the steps and actions involved in the workflow. The schema includes definitions for various types of actions, such as commenting, crawling folders, executing bash commands, and more. It also defines the structure of the workflow, including inputs, outputs, and steps.
📋 This file is a JSON schema that defines the structure and properties of a workflow definition.
🔢 It includes various action models that can be used in the workflow, such as commenting, crawling folders, making API calls, running bash commands, and more.
🧩 The workflow definition consists of a series of steps, each containing one or more actions or sub-workflows.
🔀 Conditional logic can be added using If statements based on Python lambda expressions.
📥 The definition can have inputs and outputs, which are arrays of strings representing the variables used in the workflow.
📝 Each action model has specific properties and inputs required for its execution.
🔗 References to other definitions are used to reuse common properties and structures.
📄 The file also includes definitions for templates, variables, constants, and lambda expressions used within the actions.
📖 This JSON schema serves as a blueprint for creating and validating workflows in a specific format.


### [`trigger_schema.json`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./trigger_schema.json/)

📝 This file contains a JSON schema definition.
🔍 The purpose of the file is to define the structure and properties of various data models used in a system.
🏷️ The file includes definitions for different types of actions, triggers, and parameters.
📂 Each definition includes properties such as title, description, type, and required fields.
📝 The file also includes references to other definitions within the schema.
🌟 The schema provides a standardized format for validating and manipulating data within the system.
🔧 It can be used by developers to ensure consistency and correctness when working with the defined data models.
💡 The file can serve as a documentation resource for understanding the structure and properties of the different data models.
🤖 The schema can be used by automated tools to generate code, perform data validation, or provide autocomplete suggestions.
⚠️ It's important to review and understand the definitions in this file in order to correctly use and interact with the data models in the system.
📝 This file is a JSON schema definition.
📝 It defines a data structure for a trigger configuration.
📝 The trigger configuration includes various types of triggers such as label, comment, push, and cron triggers.
📝 Each trigger type is defined with its own properties and actions.
📝 Actions include various tasks such as commenting, setting issue title, crawling folders, making API calls, running bash commands, and more.
📝 The file also defines different models for each action type, specifying their properties and required inputs.
📝 The trigger configuration can have multiple triggers, each with its own set of actions.
📝 The file also includes definitions for various parameter types such as templates, variables, constants, and lambda expressions.
📝 The purpose of this file is to provide a standardized schema for defining trigger configurations in a workflow automation system.
📝 The schema can be used to validate and enforce the structure of trigger configurations in order to ensure consistency and correctness.


### [`workflow_schema.json`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./workflow_schema.json/)

📋 This file contains a JSON object describing a workflow definition.
📝 The workflow definition includes various types of actions that can be performed.
🔀 Actions can be performed iteratively or conditionally based on certain criteria.
🔀 Actions can include commenting, setting issue titles, crawling folders, executing bash commands, committing and pushing files, and more.
🔄 The workflow definition also includes steps which specify the order and flow of the actions.
🔧 Inputs and outputs can be defined for the workflow and individual actions.
🔀 The workflow definition allows for nesting of actions and conditionals, creating more complex workflows.
📚 The file also includes definitions for various types of declarations and models used within the workflow definition.
🗂️ The purpose of this file is to define and configure a workflow that can be executed programmatically.
📄 The file contains a JSON schema for defining workflows.
🔢 It includes various definitions for different types of actions that can be performed in a workflow.
📝 Each action has its own set of properties and can be used to perform specific tasks.
🔄 The workflow definition includes a list of steps, which can be a combination of actions, workflow invocations, and conditional statements.
🔀 Conditional statements can be used to control the flow of the workflow based on certain conditions.
🔢 Inputs and outputs can be defined for the overall workflow and individual actions.
🔍 The purpose of this file is to provide a standardized way to define and execute workflows.
💻 It can be used in automation or orchestration systems to automate complex tasks or processes.
📚 The file also includes descriptions and additional properties for each definition, providing more context and guidance for users.
📝 The schema can be used to validate and enforce the structure and properties of workflow definitions.

<!-- Living README Summary -->
32 changes: 18 additions & 14 deletions autopr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<!-- Living README Summary -->
## 🌳 Living Summary

This folder contains a collection of Python files and folders that serve different purposes for automation tasks. The "actions" folder contains files that define various actions and utilities for automation, such as running commands, publishing comments, and committing changes. The "models" folder contains files that define models, actions, and configurations for a workflow automation system. The "services" folder contains files that provide services for managing actions, caching, commits, platforms, and workflows. The "workflows" folder contains scripts and files related to workflow configurations. Overall, this folder provides reusable components and configurations for automating different tasks.
This folder contains a collection of Python files and subfolders that implement various actions, services, models, and workflows for an autonomous agent system. The "actions" folder contains files for performing tasks such as running commands, making API calls, and reading/writing files. The "services" folder provides functionalities for managing actions, branches, and pull requests, interacting with the GitHub platform, and executing workflows. The "models" folder defines data models and actions for a workflow system and an automated PR system. The "workflows" folder contains YAML files that define different automation workflows. Overall, this folder provides a comprehensive set of components for building an autonomous agent system.


### [`__init__.py`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/__init__.py/)

This file is empty.


### [`actions`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/actions/)
### [`actions/`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/actions/)

This folder contains a collection of Python files and a subfolder. The files define various actions and utilities for automation tasks. Each file represents a specific action, such as running a bash command, publishing a comment on a GitHub issue, committing and pushing changes to a remote repository, crawling and filtering the contents of a folder, inserting content into a string, generating prompts using the OpenAI API, reading the contents of a file, setting the title of an issue, and writing content into a file. The subfolder contains a file related to defining and transforming prompt contexts for auto PR generation. Overall, this folder provides a set of reusable components for automating different tasks.
This folder contains a collection of Python files that implement various actions and utilities. These files define classes and functions for performing tasks such as running bash commands, making API calls, generating prompts, reading and writing files, and searching for content within files. They also provide reusable components and base classes for building autonomous agent systems. Each file has a specific purpose and can be used independently or as part of a larger codebase.


### [`gh_actions_entrypoint.py`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/gh_actions_entrypoint.py/)
Expand All @@ -36,21 +36,25 @@ This folder contains a collection of Python files and a subfolder. The files def

### [`main.py`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/main.py/)

📝 This file contains the implementation of the `MainService` class and the `Settings` class.
🔧 The `MainService` class is the main entry point for running the autopr workflow.
🔀 It initializes various services such as the `PlatformService`, `PublishService`, `CommitService`, and `ActionService`.
⚙️ It also handles the creation of branch names, triggering events, and running workflows.
🔧 The `Settings` class provides default values for various configuration options.
📝 This file contains the implementation of the `MainService` class, which is the main entry point for the autopr application.
🔧 It initializes various services and handles the execution of triggers and workflows based on events received from the platform service.
🔀 The `run` method triggers the execution of the workflows based on the event received.
🔧 The `get_repo_path` method needs to be implemented by subclasses.
🔧 The `get_event` method also needs to be implemented by subclasses and should return the event received from the platform service.
🔧 The `get_platform_service` method initializes the platform service with the owner and repo name.
🔧 The `get_publish_service` method initializes the publish service with the platform service, owner, repo name, and other parameters.
🔧 The `get_branch_name` method generates a branch name based on the event and settings.
🔧 The `get_base_branch_name` method returns the base branch name based on the event and settings.


### [`models`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/models/)
### [`models/`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/models/)

This folder contains Python code files that define models, actions, and configurations for a workflow automation system. It includes files for working with messages, threads, issues, and pull requests, as well as files for handling different types of events that can trigger actions in the system. The purpose of these files is to provide a structured and type-safe way to define and configure workflows, handle transformations between different types, and represent and handle events.
This folder contains Python code files that define data models and actions for a workflow system and an automated PR system. The "artifacts.py" file provides a structured way to represent and manipulate messages, threads, issues, and pull requests. The "config" folder contains files that define models, actions, and transformations for the workflow system. The "events.py" file defines classes for different types of events that can trigger the automated PR system. The "executable.py" file contains types and classes related to context variables, templates, and executable actions.


### [`services`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/services/)
### [`services/`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/services/)

This folder contains various Python files that serve different purposes. Some files provide services for managing actions, caching, commits, diffs, platforms, publishing updates, and workflows. There are also utility functions for formatting and truncating nested objects. These files are part of the AutoPR project and are used for automating pull request actions and managing related tasks.
This folder contains a collection of Python files that provide various services and functionalities. The files include implementations for managing and running actions in an automated process, providing a caching service, managing commits and branches in a Git repository, handling diffs in a repository, interacting with the GitHub platform, managing and updating pull request descriptions, handling triggers and executing workflows, and formatting and truncating nested Python objects for publishing purposes. These files can be used together to create an automated pull request workflow or individually for specific functionalities.


### [`triggers.py`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/triggers.py/)
Expand All @@ -66,8 +70,8 @@ This folder contains various Python files that serve different purposes. Some fi
📌 The purpose of this file is to provide a convenient way to retrieve and process trigger configurations.


### [`workflows`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/workflows/)
### [`workflows/`](https://github.com/raphael-francis/AutoPR-internal/tree/main/./autopr/workflows/)

This folder contains Python scripts and YAML files related to workflow configurations. The `__init__.py` script provides functions for loading and collecting workflows from YAML files. The `autogenerate_readmes.yaml` file defines a workflow for generating summaries of files and folders in a directory. The `insert_into_readme.yaml` file defines a task for inserting content into a file using tag-based delimiters. The `summarize_pr.yaml` file defines a workflow for summarizing changes in a pull request.
This folder contains a collection of files related to workflow automation. The `__init__.py` file provides functions for loading and collecting workflows from YAML files. The `api_git_history.yaml` file defines a workflow for making API calls, saving the response to a file, and pushing it to a Git repository. The `autogenerate_readmes.yaml` file contains workflows for summarizing files and folders and generating README summaries. The `insert_into_readme.yaml` file defines a task for inserting content into a file. The `summarize_pr.yaml` file defines a workflow for summarizing changes in a pull request.

<!-- Living README Summary -->
Loading

0 comments on commit bc2263b

Please sign in to comment.