Add a doc for contributor tips (#2480) Contains some recommendations for tools and git setup for people contributing to IREE. This is an opinionated guide that is largely just *my* setup, but I know it overlaps significantly with other people's as well and hopefully it can evolve into something more general.
diff --git a/scripts/git/bazel_to_cmake.sh b/scripts/git/bazel_to_cmake.sh index 5b8234f..e5738fa 100755 --- a/scripts/git/bazel_to_cmake.sh +++ b/scripts/git/bazel_to_cmake.sh
@@ -19,7 +19,7 @@ # # - Requries the gh CLI (https://github.com/cli/cli) to create a PR. # - Will force push to the configured PR_BRANCH (default "bazel-to-cmake-fix") -# on the configured FORK_REMOTE (default "fork") +# on the configured FORK_REMOTE (default "origin") # - Requires that local BASE_BRANCH branch is a pristine (potentially stale) # copy of the same branch on the configured UPSTREAM_REMOTE # (default "upstream"). @@ -32,7 +32,7 @@ BASE_BRANCH="${1:-google}" PR_BRANCH="bazel-to-cmake-fix" UPSTREAM_REMOTE="${UPSTREAM_REMOTE:-upstream}" -FORK_REMOTE="${FORK_REMOTE:-fork}" +FORK_REMOTE="${FORK_REMOTE:-origin}" if [[ -n "$(git status --porcelain)" ]]; then echo "Working directory not clean. Aborting"
diff --git a/scripts/git/google_to_main.sh b/scripts/git/google_to_main.sh index bb64413..0ec91a7 100755 --- a/scripts/git/google_to_main.sh +++ b/scripts/git/google_to_main.sh
@@ -19,7 +19,7 @@ # # - Requries the gh CLI (https://github.com/cli/cli) to create a PR. # - Will force push to the configured PR_BRANCH (default "google-to-main") on -# the configured FORK_REMOTE (default "fork") +# the configured FORK_REMOTE (default "origin") # - Requires that local "google" branch is a pristine (potentially stale) copy # of the "google" branch on the configured UPSTREAM_REMOTE # (default "upstream"). @@ -33,7 +33,7 @@ PR_BRANCH="${PR_BRANCH:-google-to-main}" UPSTREAM_REMOTE="${UPSTREAM_REMOTE:-upstream}" -FORK_REMOTE="${FORK_REMOTE:-fork}" +FORK_REMOTE="${FORK_REMOTE:-origin}" if [[ -n "$(git status --porcelain)" ]]; then echo "Working directory not clean. Aborting"
diff --git a/scripts/git/main_to_google.sh b/scripts/git/main_to_google.sh index 4de198a..53c2513 100755 --- a/scripts/git/main_to_google.sh +++ b/scripts/git/main_to_google.sh
@@ -19,7 +19,7 @@ # # - Requries the gh CLI (https://github.com/cli/cli) to create a PR. # - Will force push to the configured PR_BRANCH (default "main-to-google") on -# the configured FORK_REMOTE (default "fork") +# the configured FORK_REMOTE (default "origin") # - Requires that local "main" branch is a pristine (potentially stale) copy # of the "main" branch on the configured UPSTREAM_REMOTE # (default "upstream"). @@ -33,7 +33,7 @@ PR_BRANCH="${PR_BRANCH:-main-to-google}" UPSTREAM_REMOTE="${UPSTREAM_REMOTE:-upstream}" -FORK_REMOTE="${FORK_REMOTE:-fork}" +FORK_REMOTE="${FORK_REMOTE:-origin}" if [[ -n "$(git status --porcelain)" ]]; then echo "Working directory not clean. Aborting"
diff --git a/scripts/git/update_tf_submodule.sh b/scripts/git/update_tf_submodule.sh index 0d6f776..a3aac63 100755 --- a/scripts/git/update_tf_submodule.sh +++ b/scripts/git/update_tf_submodule.sh
@@ -20,7 +20,7 @@ # # - Requries the gh CLI (https://github.com/cli/cli) to create a PR. # - Will force push to the configured PR_BRANCH (default "tf-submodule-update") -# on the configured FORK_REMOTE (default "fork") +# on the configured FORK_REMOTE (default "origin") # - Requires that local BASE_BRANCH branch is a pristine (potentially stale) # copy of the same branch on the configured UPSTREAM_REMOTE # (default "upstream"). @@ -37,7 +37,7 @@ PR_BRANCH="tf-submodule-update" BASE_BRANCH="${1:-google}" UPSTREAM_REMOTE="${UPSTREAM_REMOTE:-upstream}" -FORK_REMOTE="${FORK_REMOTE:-fork}" +FORK_REMOTE="${FORK_REMOTE:-origin}" TF_COMMIT_NICKNAME="" if [[ -n "$(git status --porcelain)" ]]; then @@ -82,5 +82,5 @@ )" git commit -am "${TITLE?}" -git push -f fork "${PR_BRANCH?}" +git push -f "${FORK_REMOTE?}" "${PR_BRANCH?}" gh pr create --title="${TITLE?}" --body="${BODY?}" --base="${BASE_BRANCH?}"