neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

lintdocurls.yml (1148B)


      1 name: lintdoc-urls
      2 on:
      3  schedule:
      4    - cron: '22 22 * * 5'
      5  workflow_dispatch:
      6 
      7 jobs:
      8  check-unreachable-urls:
      9    runs-on: ubuntu-latest
     10    permissions:
     11      issues: write
     12    env:
     13      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     14    steps:
     15      - uses: actions/checkout@v6
     16        with:
     17          fetch-depth: 0
     18 
     19      - name: Set up git config
     20        run: |
     21          git config --global user.name 'marvim'
     22          git config --global user.email 'marvim@users.noreply.github.com'
     23 
     24      - uses: ./.github/actions/setup
     25 
     26      - name: Check for unreachable URLs
     27        id: unreachable-urls
     28        env:
     29          run_url: https://github.com/neovim/neovim/actions/runs/${{ github.run_id }}
     30        run: |
     31          OUT_FILE=$(mktemp)
     32          make lintdocurls 2>&1 | sed -n '/invalid URLs/,/^}/p' > $OUT_FILE
     33          if [ -n $OUT_FILE -a -s $OUT_FILE ]; then
     34            # wrap output in a code block
     35            sed -i -e '1i```' -e '$a```' $OUT_FILE
     36            echo "Automatically generated on $(date) from $run_url" >> $OUT_FILE
     37            gh issue reopen 36597
     38            gh issue edit 36597 --body-file $OUT_FILE
     39          fi