# 2. Make sure you can correctly push and force push to the github
# repository
#
-# Usage: github-merge-pr.sh PR_NUMBER BRANCH
+# Usage: github-merge-pr.sh PR_NUMBER BRANCH REPO_NAME
+#
+# BRANCH is optional and defaults to main.
+# REPO_NAME is optional and defaults to openwrt. It does
+# describe the repository name to use to pull PR info from.
-# Github repository, just the name/repo part, no .git suffix, no base url!
-REPO="openwrt/openwrt"
+# Github repository owner or organization name.
+GITHUB_REPO_OWNER="openwrt"
# Your repository token, generate this token at your profile page:
# - Navigate to https://github.com/settings/tokens
PRID="$1"
BRANCH="${2:-main}"
-DRY_RUN="$3"
+GITHUB_REPO_NAME="${3:-openwrt}"
+DRY_RUN="$4"
+
GIT=git
+REPO="$GITHUB_REPO_OWNER"/"$GITHUB_REPO_NAME"
yesno() {
local prompt="$1"