Skip to content

Commit d7bbbb8

Browse files
committed
simple trigger on comments
1 parent a52569a commit d7bbbb8

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

.github/workflows/tc_agent.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
name: TC Action Agent - Do It
22

3-
on:
4-
issue_comment:
5-
types: [created, edited]
3+
on: issue_comment
64

75
jobs:
8-
tc-acion-agent:
6+
pr_commented:
7+
# This job only runs for pull request comments
8+
name: TC Action Agent - Do It - PR comment
9+
if: ${{ github.event.issue.pull_request }}
910
runs-on: ubuntu-latest
10-
1111
steps:
12-
- name: Checkout Repo
13-
uses: actions/checkout@v3
12+
- run: |
13+
echo A comment on PR $NUMBER
14+
env:
15+
NUMBER: ${{ github.event.issue.number }}
1416
15-
- name: TC Action Agent
16-
uses: topcoder-platform/tc-action-agent@master
17-
with:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GITHUB_TOKEN is there by default so you just need to keep it like it is and not necessarily need to add it as secret as it will throw an error. [More Details](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)
17+
issue_commented:
18+
# This job only runs for issue comments
19+
name: TC Action Agent - Do It - Issue comment
20+
if: ${{ !github.event.issue.pull_request }}
21+
runs-on: ubuntu-latest
22+
steps:
23+
- run: |
24+
echo A comment on issue $NUMBER
25+
env:
26+
NUMBER: ${{ github.event.issue.number }}

0 commit comments

Comments
 (0)