diff mbox series

[8/8] Improve "context" sent in Patchwork checks

Message ID 20180720115728.19312-8-ruscur@russell.cc
State Accepted
Headers show
Series [1/8] Convert from hyper to reqwest | expand

Commit Message

Russell Currey July 20, 2018, 11:57 a.m. UTC
No need to mention snowpatch here, it should just be the name of
the test.

Signed-off-by: Russell Currey <ruscur@russell.cc>
---
 src/main.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Andrew Donnellan July 23, 2018, 1:17 a.m. UTC | #1
On 20/07/18 21:57, Russell Currey wrote:
> No need to mention snowpatch here, it should just be the name of
> the test.
> 
> Signed-off-by: Russell Currey <ruscur@russell.cc>

Looks good

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

> ---
>   src/main.rs | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/main.rs b/src/main.rs
> index e3b36f2..eb7ffc1 100644
> --- a/src/main.rs
> +++ b/src/main.rs
> @@ -151,7 +151,7 @@ fn run_tests(
>                   format!("Test {} on branch {}", job.title, branch_name.to_string()).to_string(),
>               ),
>               state: test_result,
> -            context: Some(format!("{}-{}", "snowpatch", job.title.replace("/", "_")).to_string()),
> +            context: Some(format!("{}", job.title.replace("/", "_")).to_string()),
>               target_url: Some(jenkins.get_results_url(&build_url_real, &job.parameters)),
>           });
>       }
> @@ -227,6 +227,7 @@ fn test_patch(
>                               "Successfully applied".to_string()
>                           ).to_string(),
>                       ),
> +                    context: Some("apply_patch".to_string()),
>                       ..Default::default()
>                   });
>               }
> @@ -242,6 +243,7 @@ fn test_patch(
>                               "Patch failed to apply".to_string()
>                           ).to_string(),
>                       ),
> +                    context: Some("apply_patch".to_string()),
>                       ..Default::default()
>                   });
>                   continue;
> @@ -272,6 +274,7 @@ fn test_patch(
>           results.push(TestResult {
>               state: TestState::Fail,
>               description: Some("Failed to apply to any branch".to_string()),
> +            context: Some("apply_patch".to_string()),
>               ..Default::default()
>           });
>       }
>
diff mbox series

Patch

diff --git a/src/main.rs b/src/main.rs
index e3b36f2..eb7ffc1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -151,7 +151,7 @@  fn run_tests(
                 format!("Test {} on branch {}", job.title, branch_name.to_string()).to_string(),
             ),
             state: test_result,
-            context: Some(format!("{}-{}", "snowpatch", job.title.replace("/", "_")).to_string()),
+            context: Some(format!("{}", job.title.replace("/", "_")).to_string()),
             target_url: Some(jenkins.get_results_url(&build_url_real, &job.parameters)),
         });
     }
@@ -227,6 +227,7 @@  fn test_patch(
                             "Successfully applied".to_string()
                         ).to_string(),
                     ),
+                    context: Some("apply_patch".to_string()),
                     ..Default::default()
                 });
             }
@@ -242,6 +243,7 @@  fn test_patch(
                             "Patch failed to apply".to_string()
                         ).to_string(),
                     ),
+                    context: Some("apply_patch".to_string()),
                     ..Default::default()
                 });
                 continue;
@@ -272,6 +274,7 @@  fn test_patch(
         results.push(TestResult {
             state: TestState::Fail,
             description: Some("Failed to apply to any branch".to_string()),
+            context: Some("apply_patch".to_string()),
             ..Default::default()
         });
     }