Skip to content

Bump commonmarker from 0.23.9 to 0.23.10 #61

Bump commonmarker from 0.23.9 to 0.23.10

Bump commonmarker from 0.23.9 to 0.23.10 #61

# From https://raw.githubusercontent.com/urlstechie/urlchecker-action/master/examples/urlchecker-pr-label.yml
on:
pull_request:
types: [labeled]
name: Commands
jobs:
urlchecks:
# check launched when a PR is labelled with the "needs-url-checks" label
# create that label first :-)
if: contains(github.event.pull_request.labels.*.name, 'needs-url-checks')
name: check-urls
runs-on: ubuntu-latest
steps:
# If you want to use git instead of the API to find changed files
# Use something like https://github.com/actions/checkout#fetch-all-branches
- uses: actions/checkout@v3
# As this only gets one page from the API it is limited to 30 files
# for more, checkout with more depth (see earlier comment)
# and use e.g. https://stackoverflow.com/a/41140296/5489251
# The changed files list is formatted for urlchecker
# and saved as an environment variable so the next step can access it.
- name: list files
run: |
PR=$(jq --raw-output .pull_request.number "${GITHUB_EVENT_PATH}")
echo "PR=${PR}" >> $GITHUB_ENV
files=$(curl --request GET \
--url https://api.github.com/repos/${{ github.repository }}/pulls/$PR/files \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'Accept: application/vnd.github.antiope-preview+json' \
--header 'content-type: application/json' | jq --raw-output .[].filename | sed 's/^\|$/"/g'|paste -sd, - | tr -d \" | tr -d \')
echo "files=${files}" >> $GITHUB_ENV
# Run URL checks
- name: URLs-checker
uses: urlstechie/urlchecker-action@master
with:
save: "urls.csv"
# only include the changed files
include_files: ${{ env.files }}
print_all: true,
exclude_patterns: http://api.qrserver.com,http://172.
# In case of failure, upload results as artifacts
- name: Archive URL checking results
if: failure()
uses: actions/upload-artifact@v3.1.2
with:
name: urlchecker-results
path: urls.csv
# Remove the label from the PR after the checks are done
- name: Delete label
if: always()
run: |
curl --request DELETE \
--url https://api.github.com/repos/${{ github.repository }}/issues/${{ env.PR }}/labels/needs-url-checks \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \