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

Commits on Jan 20, 2021

  1. tasks/evaluate: error on PRs targeting nixos-* or nixpkgs-* branches

    A PR's target branch is easy to overlook. ofborg should complain loudly
    if a nixos-* or nixpkgs-* branch is the target of a PR.
    cole-h committed Jan 20, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f56bea3 View commit details
Showing with 11 additions and 0 deletions.
  1. +11 −0 ofborg/src/tasks/evaluate.rs
11 changes: 11 additions & 0 deletions ofborg/src/tasks/evaluate.rs
Original file line number Diff line number Diff line change
@@ -334,6 +334,17 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
None => String::from("master"),
};

if target_branch.starts_with("nixos-") || target_branch.starts_with("nixpkgs-") {
overall_status.set_with_description(
"The branch you have targeted is a read-only mirror for channels. \
Please target release-* or master.",
hubcaps::statuses::State::Error,
)?;

info!("PR targets a nixos-* or nixpkgs-* branch");
return Ok(self.actions().skip(&job));
};

overall_status.set_with_description(
format!("Checking out {}", &target_branch).as_ref(),
hubcaps::statuses::State::Pending,