diff --git a/ci/lib/setup-git.sh b/ci/lib/setup-git.sh deleted file mode 100644 index 6be3d00af..000000000 --- a/ci/lib/setup-git.sh +++ /dev/null @@ -1,5 +0,0 @@ -# only source this file -# ================================================== - -git config --global user.name "Nur a bot" -git config --global user.email "joerg.nur-bot@thalheim.io" diff --git a/ci/update-nur-search.sh b/ci/update-nur-search.sh index c5b5e4d66..1412e0698 100755 --- a/ci/update-nur-search.sh +++ b/ci/update-nur-search.sh @@ -5,7 +5,6 @@ set -eu -o pipefail # Exit with nonzero exit code if anything fails DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" -source ${DIR}/lib/setup-git.sh set -x @@ -26,7 +25,7 @@ nix run '(import ./release.nix {})' -c nur index nur-combined > nur-search/data/ cd nur-search if [[ ! -z "$(git diff --exit-code)" ]]; then git add ./data/packages.json - git commit -m "automatic update package.json" + git commit --author "Nur a bot " -m "automatic update package.json" git pull --rebase origin master git push origin master nix-shell --run "make clean && make && make publish" diff --git a/ci/update-nur.sh b/ci/update-nur.sh index 045efd635..9d137bfc1 100755 --- a/ci/update-nur.sh +++ b/ci/update-nur.sh @@ -23,7 +23,7 @@ if [[ -z "$(git diff --exit-code)" ]]; then echo "No changes to the output on this push; exiting." else git add --all repos.json* - git commit -m "automatic update" + git commit --author "Nur a bot " -m "automatic update" # in case we are getting overtaken by a different job git pull --rebase origin master git push "https://$API_TOKEN_GITHUB@github.com/nix-community/NUR" HEAD:master diff --git a/nur/combine.py b/nur/combine.py index 365429ea9..5023c26ae 100644 --- a/nur/combine.py +++ b/nur/combine.py @@ -42,7 +42,16 @@ def commit_files(files: List[str], message: str) -> None: cmd.extend(files) subprocess.check_call(cmd) if repo_changed(): - subprocess.check_call(["git", "commit", "-m", message]) + subprocess.check_call( + [ + "git", + "commit", + "--author", + "Nur a bot ", + "-m", + message, + ] + ) def commit_repo(repo: Repo, message: str, path: Path) -> Repo: