Radish alpha
r
rad:z2UcCU1LgMshWvXj6hXSDDrwB8q8M
Radicle Job Collaborative Object
Radicle
Git
feat: add program to manipulate and inspect job COBs
Merged liw opened 9 months ago

Signed-off-by: Lars Wirzenius liw@liw.fi

liw opened with revision d9f4dad0 on base 574129a2 +615 -0 9 months ago

Signed-off-by: Lars Wirzenius liw@liw.fi

levitte reviewed 9 months ago

May I suggest a different CLI language?

First of all, I think it would be a bit cool to have this command integrated into rad, by renaming it to rad-job.

Furthermore, partly to avoid repeating job, but also to align better with existing rad language, I’d like to propose the following subcommand changes.

currentnewdescription
jobnew or initCreate a job COB for a specific Git commit
jobslistList all job COBs for a repository
show-jobshowShow the job COB for a Git commit

Also to align with existing rad subcommands such as rad issue, list could be made the default command.

Finally, I have a small output change suggestion:

diff --git a/src/main.rs b/src/main.rs
index 30982a6..9d2e5b5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -154,7 +154,7 @@ impl JobsList {
 
         line(&mut s, format!("count: {}", self.count));
         for shown in self.jobs.iter() {
-            line(&mut s, format!("job {}", shown.job_id));
+            line(&mut s, format!("job {} (oid {})", shown.job_id, shown.oid));
             for run in shown.runs.iter() {
                 line(&mut s, format!("  node {}", run.node_id));
                 for run2 in run.runs.iter() {

For any git user, the oid makes the job relatable to what they have in their commit history.

liw pushed revision 2 d9fe84e7 on base 574129a2 +619 -0 9 months ago

Apply suggestions from Richard Levitte

fintohaps pushed revision 3 7ec1c77e on base 574129a2 +813 -0 9 months ago

Changes:

  • Introduce FindByCommit iterator
  • Introduce display module
  • Refactoring of CLI
levitte pushed revision 4 2d82eaa6 on base 574129a2 +834 -0 9 months ago
levitte pushed revision 5 7be52ad3 on base 574129a2 +834 -0 9 months ago
fintohaps pushed revision 6 152d3043 on base 574129a2 +830 -0 9 months ago

Changes:

  • Remove optional UUID for rad job run
  • Rename Error to RadJobError
  • Improve wording of doc strings
fintohaps pushed revision 7 193cf268 on base 574129a2 +830 -0 9 months ago

Changes:

  • Re-attribution of commit
fintohaps merged revision 193cf268 at 8530300d 9 months ago