diff --git a/src/update_nixpkgs/update.py b/src/update_nixpkgs/update.py index aee9466..b98216d 100644 --- a/src/update_nixpkgs/update.py +++ b/src/update_nixpkgs/update.py @@ -93,7 +93,8 @@ def rebase_nixpkgs( branch_to_rebase: str, integration_branch: str, last_day_integration_branch: str, - force: bool + force: bool, + matrix_hookshot: MatrixHookshot ) -> NixpkgsRebaseResult | None: logging.info("Trying to rebase nixpkgs repository.") if nixpkgs_repo.is_dirty(): @@ -125,6 +126,18 @@ def rebase_nixpkgs( nixpkgs_repo.git.rebase(f"upstream/{branch_to_rebase}") except GitCommandError: logging.exception("nixpkgs rebase failed") + matrix_hookshot.send_notification(f"""\ +update-nixpkgs: ERROR nixpkgs rebase failed for {branch_to_rebase}. Please resolve the conflict manually with the following commands: + +``` +cd nixpkgs +git fetch upstream +git fetch origin +git checkout -b {integration_branch} origin/{branch_to_rebase} +git rebase upstream/{branch_to_rebase} +git push origin {integration_branch} +``` +""") sys.exit(1) # Check if there are new commits compared to the last day's integration branch.