Skyscanner / turbolift

A simple tool to help apply changes across many GitHub repositories simultaneously

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'turbolift update-prs' feature

JimNero009 opened this issue · comments

I've recently had a couple of situations where new information has come to light only after mass-raising a bunch of PRs. That new information would be useful to include in the PR description for the benefit of those that haven't yet go around to reviewing the PR, but turbolift (as far as I can tell) doesn't keep a track of the PRs it has raised. This isn't necessarily a problem, but it does mean that the only interaction I have with the PR stage is just the creation stage and I have to live with whatever description I had for ever more.

I'm thinking there could be a different option, or perhaps a flag, that executes code similar to that for create-pr, but is able to update the description of the PR given the content of local README.md file. The logic might be something like:

  1. For repo in repos.txt, try to create PR. If there's no PR, no problem, job done.
  2. If it fails because a PR already exists, try and update the description. I don't think it even has to be clever enough to decide if it needs to, but that might be nice.

This could be combined together with #12 and #60, perhaps.

e.g.

turbolift update-prs --amend-description   # Replaces the description, using current README.md

turbolift update-prs --set-draft=true      # Changes draft state
turbolift update-prs --set-draft=true      

turbolift update-prs --close               # Closes PRs

Thoughts?

The set-draft is an excellent suggestion; As I pointed out in #12, setting a PR back to draft is not supported natively by the gh client just yet. Still possible though.