forked from dotnet/dotnet-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1.06 KB
/
scan-for-to-do-comments.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Scan For To Do Comments
on:
pull_request_review_comment:
types: [created]
issue_comment:
types: [created]
permissions:
pull-requests: read
issues: read
jobs:
scan-for-todo-issue:
if: startsWith(github.event.comment.body, '/TODO') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
runs-on: ubuntu-latest
steps:
- name: Generate artifacts
run: |
trimmed_comment=$(echo "$COMMENT_BODY" | sed 's|/TODO ||I')
mkdir -p ./issue
echo -n "$trimmed_comment" > ./issue/issue-title
echo -n "$COMMENT_URL" > ./issue/issue-url
echo -n "$COMMENT_AUTHOR" > ./issue/issue-user
env:
COMMENT_BODY: ${{ github.event.comment.body }}
COMMENT_URL: ${{ github.event.comment.html_url }}
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
- name: Upload artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: issue-todo
path: issue/