diff --git a/.github/workflows/release-che-docs.yml b/.github/workflows/release-che-docs.yml index 2b8b97fd0..74a974824 100644 --- a/.github/workflows/release-che-docs.yml +++ b/.github/workflows/release-che-docs.yml @@ -40,8 +40,7 @@ jobs: - name: Set up environment run: | sudo apt-get update -y || true - sudo apt-get -y -q install curl bash git hub - hub --version + sudo apt-get -y -q install curl bash git - name: Set up Python 3.9 uses: actions/setup-python@v4 with: diff --git a/.github/workflows/release-chectl.yml b/.github/workflows/release-chectl.yml index bc8ac266a..d0c951c32 100644 --- a/.github/workflows/release-chectl.yml +++ b/.github/workflows/release-chectl.yml @@ -40,8 +40,7 @@ jobs: - name: Set up environment run: | sudo apt-get update -y || true - sudo apt-get -y -q install curl bash git hub - hub --version + sudo apt-get -y -q install curl bash git - name: Set up Python 3.9 uses: actions/setup-python@v4 with: diff --git a/.github/workflows/release-community-operator-PRs.yml b/.github/workflows/release-community-operator-PRs.yml index 40286ac6c..2c6ac0948 100644 --- a/.github/workflows/release-community-operator-PRs.yml +++ b/.github/workflows/release-community-operator-PRs.yml @@ -36,8 +36,7 @@ jobs: - name: Set up environment run: | sudo apt-get update -y || true - sudo apt-get -y -q install curl bash git hub - hub --version + sudo apt-get -y -q install curl bash git - name: Set up Python 3.9 uses: actions/setup-python@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 993c751f8..a06375f0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,13 +54,12 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.9 - - name: Install operator courier, yq, hub and base32 wrapper + - name: Install operator courier, yq and base32 wrapper run: | python -m pip install --upgrade pip pip install yq pip install semver - sudo apt-get -y -q install hub - hub --version + sudo apt-get -y -q install # get base32 util from che-release project wget https://raw.githubusercontent.com/eclipse/che-release/master/utils/base32 # copy base32 python-based helper script into dir that's accessed from PATH (so it's accessible to this and other called scripts) diff --git a/build/scripts/release/make-release.sh b/build/scripts/release/make-release.sh index 19ef7722c..e0c577932 100755 --- a/build/scripts/release/make-release.sh +++ b/build/scripts/release/make-release.sh @@ -255,7 +255,7 @@ pushGitChanges() { createPRToXBranch() { echo "[INFO] createPRToXBranch :: Create pull request into ${BRANCH} branch" if [[ $FORCE_UPDATE == "--force" ]]; then set +e; fi # don't fail if PR already exists (just force push commits into it) - hub pull-request $FORCE_UPDATE --base ${BRANCH} --head ${RELEASE_BRANCH} -m "ci: Release version ${RELEASE}" + gh pr create -f -B ${BRANCH} -H ${RELEASE_BRANCH} set -e } @@ -271,7 +271,7 @@ createPRToMainBranch() { fi git push origin $tmpBranch -f if [[ $FORCE_UPDATE == "--force" ]]; then set +e; fi # don't fail if PR already exists (just force push commits into it) - hub pull-request $FORCE_UPDATE --base main --head ${tmpBranch} -m "ci: Copy "$RELEASE" csv to main" + gh pr create -f -B main -H ${tmpBranch} set -e } diff --git a/build/scripts/release/prepare-community-operators-update.sh b/build/scripts/release/prepare-community-operators-update.sh index fe8d6dc78..3312e0603 100755 --- a/build/scripts/release/prepare-community-operators-update.sh +++ b/build/scripts/release/prepare-community-operators-update.sh @@ -132,19 +132,16 @@ do echo template_file="https://raw.githubusercontent.com/redhat-openshift-ecosystem/community-operators-prod/${base_branch}/docs/pull_request_template.md" - HUB=$(command -v hub 2>/dev/null) + GH=$(command -v gh 2>/dev/null) upstream_org="redhat-openshift-ecosystem" - if [[ $HUB ]] && [[ -x $HUB ]]; then - echo " - Use $HUB to generate PR from template: ${template_file}" + if [[ $GH ]] && [[ -x $GH ]]; then + echo " - Use $GH to generate PR from template: ${template_file}" PRbody=$(curl -sSLo - ${template_file} | \ sed -r -n '/#+ Updates to existing Operators/,$p' | sed -r -e "s#\[\ \]#[x]#g") - lastCommitComment="$(git log -1 --pretty=%B)" - $HUB pull-request -f -m "${lastCommitComment} - -${PRbody}" -b "${upstream_org}:${base_branch}" -h "${fork_org}:${branch}" + $GH pr create -b "${PRbody}" -B "${upstream_org}:${base_branch}" -H "${fork_org}:${branch}" else - echo "hub is not installed. Install it from https://hub.github.com/ or submit PR manually using PR template: + echo "gh is not installed. Install it from https://hub.github.com/ or submit PR manually using PR template: ${template_file} ${GIT_REMOTE_FORK_CLEAN}/pull/new/${branch}