Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/ofborg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c2ddaf91d7a2
Choose a base ref
...
head repository: NixOS/ofborg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 626d96b67287
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Aug 31, 2018

  1. Fixup comment formatting

    grahamc committed Aug 31, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    Mic92 Jörg Thalheim
    Copy the full SHA
    c3d17d9 View commit details
  2. Merge pull request #233 from NixOS/tagged-comments-fixup

    Fixup comment formatting
    grahamc authored Aug 31, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    Mic92 Jörg Thalheim
    Copy the full SHA
    626d96b View commit details
Showing with 18 additions and 11 deletions.
  1. +18 −11 ofborg/src/tasks/githubcommentposter.rs
29 changes: 18 additions & 11 deletions ofborg/src/tasks/githubcommentposter.rs
Original file line number Diff line number Diff line change
@@ -98,9 +98,8 @@ fn result_to_comment(result: &BuildResult) -> String {
Some(ref s) => s,
};

reply.push(format!(
"<!--REQUEST_ID={}-->{} on {}{}",
result.request_id,
reply.push(format!("<!--REQUEST_ID={}-->", result.request_id));
reply.push(format!("{} on {}{}",
(match *status {
BuildStatus::Skipped => "No attempt".into(),
BuildStatus::Success => "Success".into(),
@@ -206,7 +205,8 @@ mod tests {

assert_eq!(
&result_to_comment(&result),
"<!--REQUEST_ID=bogus-request-id-->Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
"<!--REQUEST_ID=bogus-request-id-->
Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
Attempted: foo
@@ -269,7 +269,8 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29

assert_eq!(
&result_to_comment(&result),
"<!--REQUEST_ID=bogus-request-id-->Failure on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
"<!--REQUEST_ID=bogus-request-id-->
Failure on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
Attempted: foo
@@ -329,7 +330,8 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29

assert_eq!(
&result_to_comment(&result),
"<!--REQUEST_ID=bogus-request-id-->Timed out, unknown build status on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
"<!--REQUEST_ID=bogus-request-id-->
Timed out, unknown build status on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
Attempted: foo
@@ -389,7 +391,8 @@ error: build of '/nix/store/l1limh50lx2cx45yb2gqpv7k8xl1mik2-gdb-8.1.drv' failed

assert_eq!(
&result_to_comment(&result),
"<!--REQUEST_ID=bogus-request-id-->Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
"<!--REQUEST_ID=bogus-request-id-->
Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
<details><summary>Partial log (click to expand)</summary><p>
@@ -448,7 +451,8 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29

assert_eq!(
&result_to_comment(&result),
"<!--REQUEST_ID=bogus-request-id-->Failure on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
"<!--REQUEST_ID=bogus-request-id-->
Failure on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
<details><summary>Partial log (click to expand)</summary><p>
@@ -496,7 +500,8 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29

assert_eq!(
&result_to_comment(&result),
"<!--REQUEST_ID=bogus-request-id-->No attempt on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=foo)
"<!--REQUEST_ID=bogus-request-id-->
No attempt on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=foo)
The following builds were skipped because they don't evaluate on x86_64-linux: not-attempted
@@ -537,7 +542,8 @@ foo

assert_eq!(
&result_to_comment(&result),
"<!--REQUEST_ID=bogus-request-id-->No attempt on x86_64-linux
"<!--REQUEST_ID=bogus-request-id-->
No attempt on x86_64-linux
The following builds were skipped because they don't evaluate on x86_64-linux: not-attempted
@@ -583,7 +589,8 @@ No partial log is available.

assert_eq!(
&result_to_comment(&result),
"<!--REQUEST_ID=bogus-request-id-->Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
"<!--REQUEST_ID=bogus-request-id-->
Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
Attempted: foo