Skip to content

Commit

Permalink
Inspec signoff helper (#1163)
Browse files Browse the repository at this point in the history
Merged PR #1163.
  • Loading branch information
slevenick authored and modular-magician committed Jan 4, 2019
1 parent 9e31b8a commit 1b78e77
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .ci/magic-modules/create-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if [ "$BRANCH_NAME" = "$ORIGINAL_PR_BRANCH" ]; then

pushd build/$SUBMODULE_DIR

git log -1 --pretty=%B > ./downstream_body
git log -1 --pretty=%s > ./downstream_body
echo "" >> ./downstream_body
echo "<!-- This change is generated by MagicModules. -->" >> ./downstream_body
if [ -n "$ORIGINAL_PR_USER" ]; then
Expand All @@ -61,7 +61,7 @@ if [ "$BRANCH_NAME" = "$ORIGINAL_PR_BRANCH" ]; then
if [ -n "$ANSIBLE_REPO_USER" ]; then
pushd build/ansible

git log -1 --pretty=%B > ./downstream_body
git log -1 --pretty=%s > ./downstream_body
echo "" >> ./downstream_body
echo "<!-- This change is generated by MagicModules. -->" >> ./downstream_body
if [ -n "$ORIGINAL_PR_USER" ]; then
Expand All @@ -80,7 +80,7 @@ if [ "$BRANCH_NAME" = "$ORIGINAL_PR_BRANCH" ]; then
if [ -n "$INSPEC_REPO_USER" ]; then
pushd build/inspec

git log -1 --pretty=%B > ./downstream_body
git log -1 --pretty=%s > ./downstream_body
echo "" >> ./downstream_body
echo "<!-- This change is generated by MagicModules. -->" >> ./downstream_body
if [ -n "$ORIGINAL_PR_USER" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .ci/magic-modules/generate-inspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ git config --global user.name "Modular Magician"

git add -A
# Set the "author" to the commit's real author.
git commit -m "$INSPEC_COMMIT_MSG" --author="$LAST_COMMIT_AUTHOR" --signoff || true # don't crash if no changes
git commit -m "$INSPEC_COMMIT_MSG" --author="$LAST_COMMIT_AUTHOR" || true # don't crash if no changes
git checkout -B "$(cat ../../branchname)"

apply_patches "$PATCH_DIR/modular-magician/inspec-gcp" "$INSPEC_COMMIT_MSG" "$LAST_COMMIT_AUTHOR" "master"
Expand Down
2 changes: 1 addition & 1 deletion .ci/magic-modules/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ function apply_patches {
# We keep all the changes (--soft).
git reset --soft "$(git merge-base HEAD "$4")"
# Then we commit again.
git commit -m "$2" --author="$3" || true # don't crash if no changes
git commit -m "$2" --author="$3" --signoff || true # don't crash if no changes
}

0 comments on commit 1b78e77

Please sign in to comment.