Skip to content

Commit

Permalink
refactor(update): use gh instead of hub to create a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske committed Jun 24, 2024
1 parent a8f4811 commit 1f80ea2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@

---

## Unreleased

* refactor: for updating switch from `hub` to the offical Github `gh` cli command.

---

## 2.11.1 released 30-May-2024

* Fix: if no health-checks are defined for a dependency then assume it to be healthy.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ Pongo repository must be updated.
To do so there are some pre-requisites;
- have [hub](https://hub.github.com/) installed and configured
- have [gh](https://cli.github.com/) installed and configured
- on OSX have [coreutils](https://www.gnu.org/software/coreutils/coreutils.html) installed
- have access to the `kong-pongo` (push) and `kong-ee` (read/clone) repositories on Github
Expand Down
10 changes: 8 additions & 2 deletions assets/add_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ Usage:
test: add "test" to make it a test run without pushing updates
This tool will attempt to update Pongo by adding the requested version.
Exitcodes:
- 0: success
- 1: error
- 2: version was already present, and doesn't need adding
EOF
}

Expand Down Expand Up @@ -66,7 +72,7 @@ msg "Version to add: $ADD_VERSION"

if version_exists "$ADD_VERSION"; then
err "Version '$ADD_VERSION' is already available"
exit 1
exit 2
fi

VERSIONS_FILE=${LOCAL_PATH}/assets/kong_${CODE_BASE}_versions.ver
Expand Down Expand Up @@ -143,7 +149,7 @@ else
fi
msg "Now creating a Github pull-request:"
if [[ "$DRY_RUN" == "" ]]; then
hub pull-request --no-edit
gh pr create --fill
if [[ ! $? -eq 0 ]]; then
git checkout "$PREVIOUS_BRANCH" &> /dev/null
git branch -D "$BRANCH_NAME" &> /dev/null
Expand Down

0 comments on commit 1f80ea2

Please sign in to comment.