Skip to content

Commit

Permalink
Merge pull request #45 from AdrianDsg/adriandsg/enhance-upgrade-ci-ou…
Browse files Browse the repository at this point in the history
…tput

enhance readability of markdown contents
  • Loading branch information
MousaZeidBaker committed Dec 13, 2023
2 parents 1156cc8 + 7d01e90 commit 42967b8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/upgrade_pip_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ jobs:
run: |
diff_str=$(git diff poetry.lock || echo "")
pr_body=$(echo "$diff_str" | grep -E "name\s*=\s*\"" | sed "s/^\s*name\s*=\s*\"\([^\"]*\)\"\s*$/\* [\`\1\`](https:\/\/pypi.org\/project\/\1\)/g")
# find the names of all modified dependencies
pr_body=$(echo "$diff_str" | grep -E "name\s*=\s*\"")
# remove removed dependencies
pr_body=$(echo "$pr_body" | sed 's/^\s*\-name\s*=\s*\"\([^\"]*\)\"\s*$//g' | sed '/^$/d')
# add pypi links to new and upgraded dependencies
pr_body=$(echo "$pr_body" | sed "s/^\s*[\+]*name\s*=\s*\"\([^\"]*\)\"\s*$/\* [\`\1\`](https:\/\/pypi.org\/project\/\1\)/g")
pr_body="## Upgrade pip dependencies\n\nThis **pull request** upgrades:\n\n$pr_body\n\nThe list items above have been pulled from the \`poetry.lock\` file.\n\nThe pull request will be updated by subsequent runs of the GitHub Actions workflow that generated it.\n"
Expand Down

0 comments on commit 42967b8

Please sign in to comment.