microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
6357dc0d0e1fb00a591a2a8aaf243804d727e52b

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/commenter.yml

41lines · modecode

1name: Make Change Comment
2
3on:
4 workflow_run:
5 workflows: ["Consistency"]
6 types:
7 - completed
8
9permissions:
10 pull-requests: write
11
12jobs:
13 # DO NOT BUILD ANYTHING FROM A PR HERE https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
14 commenter:
15 if: >
16 github.event.workflow_run.event == 'pull_request' &&
17 github.actor != 'dependabot[bot]' &&
18 !startsWith(github.head_ref, 'publish/')
19 runs-on: ubuntu-latest
20 steps:
21 - uses: actions/checkout@v6
22 - name: Prepare artifact directory
23 run: mkdir -p "${{ runner.temp }}/comment-artifact"
24 - uses: actions/download-artifact@v8
25 with:
26 name: comment
27 run-id: ${{github.event.workflow_run.id }}
28 github-token: ${{secrets.GITHUB_TOKEN}}
29 path: ${{ runner.temp }}/comment-artifact
30 - name: Display structure of downloaded files
31 run: ls -R
32
33 - uses: ./.github/actions/setup
34
35 - run: pnpm install
36 name: Install dependencies
37
38 - run: pnpm chronus-github-pr-commenter --comment-file "${{ runner.temp }}/comment-artifact/comment.json"
39 env:
40 GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
41 name: Create/update comment
42