ubiquity-os / plugins-wishlist

0 stars 2 forks source link

Auto `/fix` CI failures #31

Open 0x4007 opened 1 month ago

0x4007 commented 1 month ago

One dream I always had was to have ChatGPT automatically commit a change (perhaps via pull) if tests break, and giving it like ten attempts to keep trying a fix until it gives up on its pull.

Then it could, in theory automatically fix small problems. This might be difficult to get right so that it doesn't get in the way but it could be a handy feature.

Perhaps it could be invoked with a slash command /fix etc

_Originally posted by @0x4007 in https://github.com/ubiquibot/automated-merging/pull/4#discussion_r1694415502_

Can probably make use of the code in the linked pull above.

bytegun commented 1 month ago

/start

ubiquibot[bot] commented 1 month ago
! action has an uncaught error
bytegun commented 1 month ago

/help

ubiquibot-dev[bot] commented 1 month ago

Available Commands

Command Description Example
/help List all available commands. /help
/allow Allows the user to modify the given label. /allow @user1 label
/query Returns the user's wallet, access, and multiplier information. /query @ubiquibot
/wallet Register your wallet address for payments. /wallet ubq.eth
ubiquibot[bot] commented 1 month ago

Available Commands

Command Description Example
/start Assign yourself to the issue. /start
/stop Unassign yourself from the issue. /stop
/help List all available commands. /help
/query Returns the user's wallet, access, and multiplier information. /query @user
/ask Ask a context aware question. /ask is x or y the best approach?
/multiplier Set the task payout multiplier for a specific contributor, and provide a reason for why. /multiplier @user 0.5 "multiplier
reason"
/labels Set access control, for admins only. /labels @user priority time
price
/authorize Approve a label change, for admins only. /authorize
/wallet Register your wallet address for payments. /wallet ubq.eth
bytegun commented 1 month ago

/start

bytegun commented 1 month ago

/stop

ubiquibot[bot] commented 1 month ago
! No assignees found for issue
bytegun commented 1 month ago

/start

gentlementlegen commented 1 month ago

/query @bytegun

ubiquibot-dev[bot] commented 1 month ago
User information for bytegun was not found.
ubiquibot[bot] commented 1 month ago
! action has an uncaught error
gentlementlegen commented 1 month ago

@bytegun I think it doesn't work because you didn't link a wallet so the start command fails. Please first register a wallet and then try again to assign yourself to the issue.

0x4007 commented 1 month ago
! action has an uncaught error

@gentlementlegen I suppose it is a good idea to ensure that the new bot catches this and provides the necessary instructions.

gentlementlegen commented 1 month ago

@0x4007 start-stop was not enabled when @bytegun initiated the command, but I believe that's what should have happened, lemme test.

ubiquity-ubiquibot commented 1 month ago

/query @ubiquity-ubiquibot

ubiquibot-dev[bot] commented 1 month ago
Failed to run command-query-user.
User @ubiquity-ubiquibot cannot request user ubiquity-ubiquibot as it is not a collaborator.

Usage: program [options] [command]

Options:
  -h, --help                   display help for command

Commands:
  /query [options] <username>
  help [command]               display help for command
ubiquibot[bot] commented 1 month ago
! action has an uncaught error
ubiquity-ubiquibot commented 1 month ago

/start

ubiquibot-dev[bot] commented 1 month ago
! Please set your wallet address with the /wallet command first and try again.
gentlementlegen commented 1 month ago
! Please set your wallet address with the /wallet command first and try again.

@0x4007 Seems to be handled fine.

0x4007 commented 1 month ago
Failed to run command-query-user.
User @ubiquity-ubiquibot cannot request user ubiquity-ubiquibot as it is not a collaborator.

Usage: program [options] [command]

Options:
  -h, --help                   display help for command

Commands:
  /query [options] <username>
  help [command]               display help for command

This is an interesting format to post a message, but we should parse/capture only the relevant part of the output and dress it up accordingly.

! Requesting user details is forbidden because you are not a repository collaborator. 

Also I feel like anybody should be able to query by default.


Also I just realized we could color code essentially the equivalent of HTTP 1xx 2xx 3xx 4xx 5xx class errors in these bot comments.

# 1xx Class (Informational Responses)
+ 2xx Class (Successful Responses)
@@ 3xx Class (Redirection Messages) @@
! 4xx Class (Client Error Responses)
- 5xx Class (Server Error Responses)
gentlementlegen commented 1 month ago

@0x4007 It's an automatic formatting from the command line handler, which displays like a CLI. My idea behind that is later on we could have complex help commands that could give you details the same work you use a CLI, e.g. help my-command my-subcommand which would give very detailed usage. I can remove it.

The query is a setting within the configuration, see here: https://github.com/ubiquity/ubiquibot-config/blob/development/.github/.ubiquibot-config.yml#L7 I do not know what's the default, but this happened because it is set to false currently.

0x4007 commented 1 month ago

My idea behind that is later on we could have complex help commands that could give you details the same work you use a CLI, e.g. help my-command my-subcommand which would give very detailed usage. I can remove it.

This is interesting and does feel very familiar. I'm not totally against it but I think the use of colors stands out much more clearly in cluttered GitHub conversations. Also being concise is valuable on these conversations.