Commit Graph

27 Commits

Author SHA1 Message Date
Moby von Briesen b454b2ec83 pullpal: fix err definition
(whoops)
2023-10-21 11:25:39 -04:00
shoebill 9f5258fe22
Draft Github CI Pipeline (#17)
This commit defines a basic CI pipeline for releasing Pull-Pal to
prospective users. The artifacts include Pull-Pal's source and
container.
2023-10-20 15:26:09 -04:00
shoebill b0e45216bc
Add Pull-Pal Dockerfile (#11)
A Dockerfile that builds a standalone container for deploying Pull-Pal
anywhere you can launch containers.
2023-10-15 10:10:41 -04:00
Maximillian von Briesen d92efcb7e9
Prompt improvements (#9)
improve prompt templates to get response in yaml format and make parsing easier
also add debug file functionality so that exact input, prompts, and output can be easily seen for every request
2023-09-04 16:44:59 -04:00
Moby von Briesen dfef07a1c0 some changes
make some unnecessary logging debug logs
add some randomness into branch name
create directories as necessary if they don't exist
2023-05-15 19:23:36 -04:00
Moby von Briesen 157212c5fb small updates
convert errors to strings when bot is leaving a comment
comment out a portion of code that was unnecessarily pulling
2023-05-12 01:22:10 -04:00
Maximillian von Briesen 9678a1c961
Multirepo support and lots of other stuff (#3)
* Parsing issue into llm request moved to `vc` package
* Converted "issue ID" string to "issue number" int
* Added config struct to `pullpal/common.go`
* Added multi-repo config support
* Added support for custom base branches for PRs
* Added configurable wait time
* Bot should comment on pull requests and threads when running into an
error
2023-05-12 00:59:21 -04:00
Maximillian von Briesen ab7521477a
begin implementing comments (#2)
add a section of the main loop that checks for comments on PRs that the
bot has opened

reworks git logic and adds debug commands for git and llm stuff
changes a  bunch of other stuff too
2023-05-08 20:14:19 -04:00
Moby von Briesen 39d0ad7d0b update readme 2023-05-04 20:41:30 -04:00
Maximillian von Briesen cbec4c1be9
cleanup/refactor (#1)
focus on fully automated as basic/default functionality. remove unnecessary commands except for local git debug. remove unnecessary interfaces and code. remove local git functionality from github client. probably some other stuff too
2023-05-04 20:01:46 -04:00
Moby von Briesen 3a312b2b9b parse openAI api responses. get fully automated behavior kind of working 2023-05-02 22:07:10 -04:00
Moby von Briesen 99bd1929b5 add basic run command 2023-05-02 20:07:48 -04:00
Moby von Briesen 50db4d6d0e add template for responding to PR comments 2023-05-02 19:40:54 -04:00
Moby von Briesen 10c77854a9 Create "local git client" and "openai client"
OpenAIClient can be used to interact with OpenAI's API. Untested at the
moment (except with an API key that does not yet have perms)
Local git client splits the "git" functionality (e.g. make commits,
checkout branches, etc...) away from the "github" client

I also removed a lot of duplicate code for the different commands in cmd
And created a basic "local issue" command to send a "code change
request" to the llm, and receive a code change response. Eventually, I
want this to make the corresponding local git changes, for the user to
check.

TODO: github client should only be responsible for github-specific
actions, e.g. opening a PR or listing issues/comments
2023-04-25 20:32:08 -04:00
Moby von Briesen 726e34d093 Add command to list comments on PR
Only comments in the configured "users to listen to" are listed
Still need to add additional filtering in the future
2023-04-24 20:29:26 -04:00
Moby von Briesen 9cc0f4a1b8 Add plain "list issues" command and reorganize
* Add configurable users to list issues from
* Add configurable labels to require on issues
* Add a CLI subcommand that lists issues according to the criteria and
  does nothing else
* Update existing CLI REPL to list issues according to the new criteria
* Clean up and reorganize config code a little
* Add some basic types and function signature for listing comments on
  code change requests
2023-04-24 19:49:10 -04:00
Moby von Briesen b29f544c23 Fix github logic
* Allow multiple commits to be made back to back (worktre wasn't being
  set to nil after commit created)
* Allow PR to be created even if title is not provided (i.e. because
  'code change request' was skipped)
2023-04-22 22:54:00 -04:00
Moby von Briesen 529b720eb6 Loop prompt generation/response parsing
Alternate between generating prompts via Github issues and parsing LLM
responses until the user exits.

Also slightly modify LLM response parsing to handle some unintentional
text which is copied from ChatGPT's web UI for code blocks.
2023-04-22 22:44:44 -04:00
Moby von Briesen e648ed50a4 Add ability to copy LLM prompt directly to clipboard 2023-04-22 21:56:52 -04:00
Moby von Briesen b9b0b9cf12 It's working
Implement cobra and stuff
Right now there is just one root command
You can set a config file, or pass flags in via CLI
Haven't figured out how to use env variables yet
But if you run the root command,
It'll check the repo for issues, and generate an LLM prompt
You can copy-paste it to the LLM chat, then copy-paste the response to a
different file
Then press enter in the CLI tool, and it will parse the response and
open a PR with the change
2023-04-22 21:41:28 -04:00
Moby von Briesen 6b1e6f267f add functionality to write prompt to file 2023-04-22 17:58:31 -04:00
Moby von Briesen c9cf1b5e49 implement high-level functionality
integrate the llm and versioncontrol packages in the pullpal package
* Functionality to select a Github issue, and generate an LLM prompt
  from it (PickIssue)
* Functionality to parse LLM response (from string or file), update
  local git repository, and create pull request (ProcessResponse and
  ProcessResponseFromFile)
2023-04-22 17:50:57 -04:00
Moby von Briesen 3aa79401d0 Implement "local repo" functionality in github client
* Retrieving the current state (i.e. contents) of file at path in local
  repo
* Starting a commit
* Updating the contents (or creating) file at path in local repo and
  updating the "started" commit
* Finishing a commit
* Pushing commit to new remote branch (as part of creating a PR)
* Removing local repository on "shutdown"
2023-04-22 16:59:59 -04:00
Moby von Briesen 6c42bbd7b8 Implement Github client
Added "version control client" interface and created a Github
implementation of it. Right now it only creates pull requests and lists
issues.

Restructued some code. Idk if it will be permanent.

Next I plan to add behavior around replacing files in the local repo,
and creating commits.
2023-04-22 16:23:56 -04:00
Moby von Briesen a570437b9c Initial commit (part 2)
I added some code
and comments too
it's almost set up
for me and you
2023-04-22 14:50:15 -04:00
Maximillian von Briesen f0893ed8b8
Update README.md 2023-04-22 12:11:28 -04:00
Maximillian von Briesen 02be96ca8a
Initial commit 2023-04-22 11:56:31 -04:00