]> git.madduck.net Git - etc/vim.git/blob - .github/workflows/diff_shades_comment.yml

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

[pre-commit.ci] pre-commit autoupdate (#3780)
[etc/vim.git] / .github / workflows / diff_shades_comment.yml
1 name: diff-shades-comment
2
3 on:
4   workflow_run:
5     workflows: [diff-shades]
6     types: [completed]
7
8 permissions:
9   pull-requests: write
10
11 jobs:
12   comment:
13     runs-on: ubuntu-latest
14     steps:
15       - uses: actions/checkout@v3
16       - uses: actions/setup-python@v4
17         with:
18           python-version: "*"
19
20       - name: Install support dependencies
21         run: |
22           python -m pip install pip --upgrade
23           python -m pip install click packaging urllib3
24
25       - name: Get details from initial workflow run
26         id: metadata
27         env:
28           GITHUB_TOKEN: ${{ github.token }}
29         run: >
30           python scripts/diff_shades_gha_helper.py comment-details
31           ${{github.event.workflow_run.id }}
32
33       - name: Try to find pre-existing PR comment
34         if: steps.metadata.outputs.needs-comment == 'true'
35         id: find-comment
36         uses: peter-evans/find-comment@a54c31d7fa095754bfef525c0c8e5e5674c4b4b1
37         with:
38           issue-number: ${{ steps.metadata.outputs.pr-number }}
39           comment-author: "github-actions[bot]"
40           body-includes: "diff-shades"
41
42       - name: Create or update PR comment
43         if: steps.metadata.outputs.needs-comment == 'true'
44         uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa
45         with:
46           comment-id: ${{ steps.find-comment.outputs.comment-id }}
47           issue-number: ${{ steps.metadata.outputs.pr-number }}
48           body: ${{ steps.metadata.outputs.comment-body }}
49           edit-mode: replace