[snowpatch] [PATCH] Use patchwork "linkname" instead of "name"

Russell Currey ruscur at russell.cc
Wed Apr 20 14:12:21 AEST 2016


Patchwork gives us both the name of the project, and the linkname.  For
example, on patchwork.ozlabs.org the name of skiboot is "skiboot firmware
development", and the linkname (which appears in the URL) is "skiboot".
It makes more sense for snowpatch to use the latter rather than something
verbose and descriptive.

Signed-off-by: Russell Currey <ruscur at russell.cc>
---
 src/main.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index b18206c..a289b4e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -249,8 +249,8 @@ fn main() {
 
     if args.flag_series > 0 {
         let series = patchwork.get_series(&(args.flag_series as u64)).unwrap();
-        match settings.projects.get(&series.project.name) {
-            None => panic!("Couldn't find project {}", &series.project.name),
+        match settings.projects.get(&series.project.linkname) {
+            None => panic!("Couldn't find project {}", &series.project.linkname),
             Some(project) => {
                 let patch = patchwork.get_patch(&series);
                 test_patch(&settings, &project, &patch);
@@ -267,7 +267,7 @@ fn main() {
     'daemon: loop {
         let series_list = patchwork.get_series_query().unwrap().results.unwrap();
         for series in series_list {
-            match settings.projects.get(&series.project.name) {
+            match settings.projects.get(&series.project.linkname) {
                 None => continue,
                 Some(project) => {
                     let patch = patchwork.get_patch(&series);
-- 
2.8.0



More information about the snowpatch mailing list