Skip to content

Commit

Permalink
Switch to a different icon for echoed commands
Browse files Browse the repository at this point in the history
Previously used `▶` icon was the same as the icon used by GH to sygnalize
collapsable content. We're switching to `➞` to not suggest the icon is
clickable.
  • Loading branch information
michalinacienciala committed Jun 21, 2023
1 parent 57e7962 commit 9f83743
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/reusable-solidity-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,47 +234,47 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.githubToken }}
run: |
echo " Configure environment variables"
echo " Configure environment variables"
head_branch=auto-update-solidity-api-docs
base_branch=${{ inputs.destinationBaseBranch }}
echo " Checkout destination repo"
echo " Checkout destination repo"
git clone --branch $base_branch \
https://${{ inputs.userName }}:[email protected]/${{ inputs.destinationRepo }}.git \
dest-repo-clone
echo " Create/checkout head branch"
echo " Create/checkout head branch"
cd dest-repo-clone
git checkout $head_branch || git checkout -b $head_branch
echo " Synchronize docs"
echo " Synchronize docs"
mkdir -p ${{ inputs.destinationFolder }}
rsync -avh ${{ inputs.rsyncDelete && '--delete' || '' }} \
../generated-docs \
${{ inputs.destinationFolder }}
echo " Commit changes"
echo " Commit changes"
git add -A
if git status | grep -q "Changes to be committed"
then
git config --global user.email ${{ inputs.userEmail }}
git config --global user.name ${{ inputs.userName }}
git commit ${{ inputs.verifyCommits && '-S' || '' }} \
-m "Update docs by https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id}}"
echo " Push commit"
echo " Push commit"
git push --set-upstream origin HEAD:$head_branch
echo " Check if PR for the head branch already exists"
echo " Check if PR for the head branch already exists"
dest_org=$(echo ${{ inputs.destinationRepo }} | cut -d'/' -f1)
pr_for_head=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${{ inputs.destinationRepo }}/pulls?status=open&head=$dest_org:$head_branch")
if [[ $pr_for_head == $'[\n\n]' ]]; then
echo " Checked. A PR for the head branch ($head_branch) will be created"
echo " Checked. A PR for the head branch ($head_branch) will be created"
hub pull-request --base $base_branch \
--message "Update Solidity API docs" \
--message "Docs updated by workflow: https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id}}"
else
echo " Checked. A PR for head branch ($head_branch) already exists and got updated."
echo " Checked. A PR for head branch ($head_branch) already exists and got updated."
fi
else
echo " No changes detected, no commits will be made."
echo " No changes detected, no commits will be made."
exit 0
fi

0 comments on commit 9f83743

Please sign in to comment.