Skip to content

Commit 72753c7

Browse files
authored
Merge pull request #8 from topcoder-platform/feat/tc-agent
Feat/tc agent
2 parents 1471192 + d7bbbb8 commit 72753c7

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

.github/workflows/tc_agent.yml

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

3-
on:
4-
issue_comment:
5-
types:
6-
- created
7-
8-
permissions:
9-
pull-requests: write
3+
on: issue_comment
104

115
jobs:
12-
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 }}
1310
runs-on: ubuntu-latest
14-
1511
steps:
16-
- name: Checkout Repo
17-
uses: actions/checkout@v3
12+
- run: |
13+
echo A comment on PR $NUMBER
14+
env:
15+
NUMBER: ${{ github.event.issue.number }}
1816
19-
- name: TC Action Agent
20-
uses: topcoder-platform/tc-action-agent@master
21-
with:
22-
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)