kowainik / crocodealer

🐊 Manage GitHub organization files, labels, issues
https://kowainik.github.io/projects/crocodealer
Mozilla Public License 2.0
9 stars 4 forks source link

Implement `croco sync` command in dry mode #12

Closed chshersh closed 4 years ago

chshersh commented 4 years ago

It should go in the Croco.Command.Sync module. And this should do the following:

  1. Take user name, repo name with templates, file name, list of repositories to update.
  2. This function should download the template file.
  3. Then it should commit an updated file to all repos.

Since this command is a bit dangerous, this issue is only about dry implementation of this function. This means, that it should only print to terminal (ideally in a pretty way) a list of repositories which will be updated. Ideally I expect pretty colourful output in the following way:

FILE_NAME
user/repo1:     <Blue>Up-to-date</blue>
user/repo-long: <red>Doesn't have file</red>
user/repo-2:    <yellow>Outdated</yellow>

Where <color></color> is my pseudocode for colors. See the following for example of using colors:

Nimor111 commented 4 years ago

Hey,

Is this blocked by #4 or can it be worked on separately since it's a dry version? Thanks for the quick creation of issues to be worked on!

chshersh commented 4 years ago

@Nimor111, no, this is not blocked by #4. This IO function can be implemented separately, tested in GHCi and then later there will be something like:

main = readCliArguments >>= \case
    Sync ... -> ...

that connects both #4 and all other implemented functions.

Nimor111 commented 4 years ago

Great, i'd like to give it a go then.

Nimor111 commented 4 years ago

Hey, just an update. I'm working on this, but i've been really busy at work so there hasn't been much progress, I hope to finish it soon. Sorry for the delay.