Use patchwork "linkname" instead of "name"
diff mbox

Message ID 1461125541-8948-1-git-send-email-ruscur@russell.cc
State Accepted
Delegated to: Andrew Donnellan
Headers show

Commit Message

Russell Currey April 20, 2016, 4:12 a.m. UTC
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@russell.cc>
---
 src/main.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Andrew Donnellan April 20, 2016, 4:40 a.m. UTC | #1
On 20/04/16 14:12, Russell Currey wrote:
> 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@russell.cc>

Applied to master: 065029367548f369a354b2d85c2473141b492ea7

Thanks,

Patch
diff mbox

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);