Skip to content

Commit

Permalink
chore: fix nodejs pr action
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Apr 19, 2022
1 parent 8cf4fc4 commit f3d7fff
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/create-cli-deps-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ on:
required: true
default: 'latest'
dryRun:
description: "Do a dry run"
required: true
default: false
description: "Do a dry run?"
default: ''

jobs:
create-pull-request:
Expand All @@ -28,7 +27,7 @@ jobs:
git config --global user.email "npm team"
git config --global user.name "ops+robot@npmjs.com"
- name: Sync upstream changes
uses: aormsby/Fork-Sync-With-Upstream-action@v3
uses: aormsby/Fork-Sync-With-Upstream-action@v3.2
with:
target_sync_branch: master
target_repo_token: ${{ secrets.NPM_ROBOT_USER_PAT }}
Expand All @@ -39,6 +38,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.NPM_ROBOT_USER_PAT }}
run: |
base_dir="$( pwd )"/
dry_run="${{ github.event.inputs.dryRun }}"
npm_version="${{ github.event.inputs.npmVersion }}"
npm_tag=""
Expand Down Expand Up @@ -68,8 +68,7 @@ jobs:
make release
echo "Removing old npm"
base_dir="$( pwd )"/
deps_dir="$base_dir"deps/
deps_dir="$base_dir"deps/
cd "$deps_dir"
rm -rf npm/
Expand All @@ -83,18 +82,16 @@ jobs:
git add -A deps/npm
git commit -m "$message"
git rebase --whitespace=fix master
git push origin "$npm_branch"
gh_release=`gh release view "$npm_vtag" -R npm/cli --json body -q ".body"`
if [[ "$dry_run" == "true" ]]; then
echo $gh_release
git status
git show --summary
echo $message
echo $npm_branch
echo $base_branch
echo $npm_vtag
else
gh pr create -R nodejs/node -B "$base_branch" -H "npm:$npm_branch" -t "$message" -b "$gh_release"
git push origin "$npm_branch"
gh release view "$npm_vtag" -R npm/cli --json body -q ".body" | \
gh pr create -R nodejs/node -B "$base_branch" -H "npm:$npm_branch" -t "$message" -F -
fi

0 comments on commit f3d7fff

Please sign in to comment.