]> 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:

f06541b45d5c40be229487d16ca41a2cac24a067
[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@b657a70ff16d17651703a84bee1cb9ad9d2be2ea
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@c9fcb64660bc90ec1cc535646af190c992007c32
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