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

Commits on May 28, 2020

  1. don't request maintainer reviews if many files changed

    This either indicates it's most likely either a tree-wide change,
    staging-next merge or just a pull request with an incorrect target
    branch.  For none of these cases are usually relevant for specific
    package maintainers.
    LnL7 authored and cole-h committed May 28, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ec5e59a View commit details
Showing with 19 additions and 1 deletion.
  1. +19 −1 ofborg/src/tasks/eval/nixpkgs.rs
20 changes: 19 additions & 1 deletion ofborg/src/tasks/eval/nixpkgs.rs
Original file line number Diff line number Diff line change
@@ -24,9 +24,11 @@ use hubcaps::checks::{CheckRunOptions, CheckRunState, Conclusion, Output};
use hubcaps::gists::Gists;
use hubcaps::issues::{Issue, IssueRef};
use hubcaps::repositories::Repository;
use tracing::warn;
use tracing::{info, warn};
use uuid::Uuid;

static MAINTAINER_REVIEW_MAX_CHANGED_PATHS: usize = 64;

pub struct NixpkgsStrategy<'a> {
job: &'a EvaluationJob,
pull: &'a hubcaps::pulls::PullRequest<'a>,
@@ -270,6 +272,22 @@ impl<'a> NixpkgsStrategy<'a> {
},
);

if changed_paths.len() > MAINTAINER_REVIEW_MAX_CHANGED_PATHS {
info!(
"pull request has {} changed paths, skipping review requests",
changed_paths.len()
);
let status = CommitStatus::new(
self.repo.statuses(),
self.job.pr.head_sha.clone(),
String::from("grahamcofborg-eval-check-maintainers"),
String::from("large change, skipping automatic review requests"),
gist_url,
);
status.set(hubcaps::statuses::State::Success)?;
return Ok(());
}

let status = CommitStatus::new(
self.repo.statuses(),
self.job.pr.head_sha.clone(),