Skip to content

Commit

Permalink
Move from hub to gh commands
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-riggs committed Aug 22, 2024
1 parent 2ccaec4 commit 4f85439
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/scripts/create-orm-update-pull-request
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,8 @@ git config credential.helper "store --file=.git/credentials"
echo "https://${GITHUB_TOKEN}:@github.com" > .git/credentials
echo

echo "##[section]Installing github cli"
pushd .. >/dev/null
wget -nv https://github.com/github/hub/releases/download/v2.6.0/hub-linux-amd64-2.6.0.tgz -O - | tar xz
export PATH=$(pwd)/hub-linux-amd64-2.6.0/bin/:${PATH}
popd >/dev/null
hub --version
echo

echo "##[section]Check for existing pull request"
hub pr list -b main -f '%H%n' | grep "^orm-update$" && {
gh pr list -B ${BRANCH} -f '%H%n' | grep "^orm-update$" && {
echo Pull request already exists. Stopping here.
exit
} || {
Expand All @@ -39,7 +31,7 @@ echo

echo "##[section]Creating pull request"
git push -f --set-upstream origin orm-update
HUB_VERBOSE=1 hub pull-request -b main -f -m "ISPyB ORM schema update v${DATABASE_SCHEMA}
gh pr create -B ${BRANCH} -H orm-update -f -m "ISPyB ORM schema update v${DATABASE_SCHEMA}
This is an automated pull request to update the ISPyB ORM schema.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-orm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
DATABASE_SCHEMA: ${{ inputs.DATABASE_SCHEMA }}
BRANCH: ${{ github.ref_name }}

0 comments on commit 4f85439

Please sign in to comment.