Skip to content

Commit

Permalink
Merge pull request #1415 from camptocamp/error-on-changes
Browse files Browse the repository at this point in the history
Get an error when a pull request is created
  • Loading branch information
sbrunner authored Nov 30, 2023
2 parents b1d98d2 + 2340931 commit 4c2fab3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion c2cciutils/scripts/docker_versions_update.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse
import re
import subprocess # nosec
import sys
import tempfile

import ruamel.yaml
Expand Down Expand Up @@ -91,9 +92,12 @@ def main() -> None:
yaml.dump(versions_config, versions_file)

current_branch = c2cciutils.get_branch(args.branch)
c2cciutils.create_pull_request_if_needed(
has_diff = c2cciutils.create_pull_request_if_needed(
current_branch, f"dpkg-update/{current_branch}", "Update dpkg package versions"
)
if has_diff:
print("There is a diff, please check the pull request")
sys.exit(1)


if __name__ == "__main__":
Expand Down

0 comments on commit 4c2fab3

Please sign in to comment.