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: 1986c6fba7f7
Choose a base ref
...
head repository: NixOS/ofborg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 357439aeac07
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Nov 30, 2018

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    243235c View commit details
  2. Don't minimize logs

    grahamc committed Nov 30, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    travi Matt Travi
    Copy the full SHA
    357439a View commit details
Showing with 27 additions and 26 deletions.
  1. +27 −26 ofborg/src/tasks/githubcommentposter.rs
53 changes: 27 additions & 26 deletions ofborg/src/tasks/githubcommentposter.rs
Original file line number Diff line number Diff line change
@@ -46,15 +46,14 @@ impl worker::SimpleWorker for GitHubCommentPoster {
let comment = hubcaps::comments::CommentOptions { body: result_to_comment(&result) };
let check = result_to_check(&result);
println!(":{:?}", check);
println!(":{:?}", comment);

let comment_attempt = self.github
let check_create_attempt = self.github
.repo(result.repo.owner.clone(), result.repo.name.clone())
.pulls()
.get(result.pr.number)
.comments()
.create(&comment);
.checkruns()
.create(&check);

match comment_attempt {
match check_create_attempt {
Ok(comment) => {
info!("Successfully sent {:?} to {}",
comment,
@@ -63,7 +62,7 @@ impl worker::SimpleWorker for GitHubCommentPoster {
}
Err(err) => {
info!(
"Failed to send comment {:?} to {}",
"Failed to send check {:?} to {}",
err,
result.pr.number,
)
@@ -114,7 +113,15 @@ fn result_to_check(result: &LegacyBuildResult) -> CheckRunOptions {
let text: String;

if result.output.len() > 0 {
text = partial_log_segment(&result.output).join("\n");
let mut reply: Vec<String> = vec![];

reply.push("## Partial log".to_owned());
reply.push("".to_owned());
reply.push("```".to_owned());
reply.extend(result.output.clone());
reply.push("```".to_owned());

text = reply.join("\n");
} else {
text = String::from("No partial log is available.");
}
@@ -665,7 +672,7 @@ No partial log is available.
The following builds were skipped because they don't evaluate on x86_64-linux: bar
".to_string(),
text: Some("<details><summary>Partial log (click to expand)</summary><p>
text: Some("## Partial log
```
make[2]: Entering directory '/private/tmp/nix-build-gdb-8.1.drv-0/gdb-8.1/readline'
@@ -678,8 +685,7 @@ post-installation fixup
strip is /nix/store/5a88zk3jgimdmzg8rfhvm93kxib3njf9-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1
/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1
```
</p></details>".to_string()),
```".to_string()),
annotations: None,
images: None,
})
@@ -737,7 +743,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
title: "Build Results".to_string(),
summary: "Attempted: foo
".to_string(),
text: Some("<details><summary>Partial log (click to expand)</summary><p>
text: Some("## Partial log
```
make[2]: Entering directory '/private/tmp/nix-build-gdb-8.1.drv-0/gdb-8.1/readline'
@@ -750,8 +756,7 @@ post-installation fixup
strip is /nix/store/5a88zk3jgimdmzg8rfhvm93kxib3njf9-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1
/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1
```
</p></details>".to_string()),
```".to_string()),
annotations: None,
images: None,
})
@@ -808,7 +813,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
title: "Build Results".to_string(),
summary: "Attempted: foo
".to_string(),
text: Some("<details><summary>Partial log (click to expand)</summary><p>
text: Some("## Partial log
```
make[2]: Entering directory '/private/tmp/nix-build-gdb-8.1.drv-0/gdb-8.1/readline'
@@ -820,8 +825,7 @@ removed '/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1/share/info/bfd.info
post-installation fixup
building of '/nix/store/l1limh50lx2cx45yb2gqpv7k8xl1mik2-gdb-8.1.drv' timed out after 1 seconds
error: build of '/nix/store/l1limh50lx2cx45yb2gqpv7k8xl1mik2-gdb-8.1.drv' failed
```
</p></details>".to_string()),
```".to_string()),
annotations: None,
images: None,
})
@@ -878,7 +882,7 @@ error: build of '/nix/store/l1limh50lx2cx45yb2gqpv7k8xl1mik2-gdb-8.1.drv' failed
output: Some(Output {
title: "Build Results".to_string(),
summary: "".to_string(),
text: Some("<details><summary>Partial log (click to expand)</summary><p>
text: Some("## Partial log
```
make[2]: Entering directory '/private/tmp/nix-build-gdb-8.1.drv-0/gdb-8.1/readline'
@@ -891,8 +895,7 @@ post-installation fixup
strip is /nix/store/5a88zk3jgimdmzg8rfhvm93kxib3njf9-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1
/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1
```
</p></details>".to_string()),
```".to_string()),
annotations: None,
images: None,
})
@@ -949,7 +952,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
output: Some(Output {
title: "Build Results".to_string(),
summary: "".to_string(),
text: Some("<details><summary>Partial log (click to expand)</summary><p>
text: Some("## Partial log
```
make[2]: Entering directory '/private/tmp/nix-build-gdb-8.1.drv-0/gdb-8.1/readline'
@@ -962,8 +965,7 @@ post-installation fixup
strip is /nix/store/5a88zk3jgimdmzg8rfhvm93kxib3njf9-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1
/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1
```
</p></details>".to_string()),
```".to_string()),
annotations: None,
images: None,
})
@@ -1010,12 +1012,11 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
title: "Build Results".to_string(),
summary: "The following builds were skipped because they don\'t evaluate on x86_64-linux: not-attempted
".to_string(),
text: Some("<details><summary>Partial log (click to expand)</summary><p>
text: Some("## Partial log
```
foo
```
</p></details>".to_string()),
```".to_string()),
annotations: None,
images: None,
})