-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/tc agent #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
name: TC Action Agent | ||
name: TC Action Agent - Do It | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
|
||
permissions: | ||
pull-requests: write | ||
on: issue_comment | ||
|
||
jobs: | ||
tc-acion-agent: | ||
pr_commented: | ||
# This job only runs for pull request comments | ||
name: TC Action Agent - Do It - PR comment | ||
if: ${{ github.event.issue.pull_request }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- run: | | ||
echo A comment on PR $NUMBER | ||
env: | ||
NUMBER: ${{ github.event.issue.number }} | ||
|
||
- name: TC Action Agent | ||
uses: topcoder-platform/tc-action-agent@master | ||
with: | ||
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) | ||
issue_commented: | ||
# This job only runs for issue comments | ||
name: TC Action Agent - Do It - Issue comment | ||
if: ${{ !github.event.issue.pull_request }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. high |
||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
echo A comment on issue $NUMBER | ||
env: | ||
NUMBER: ${{ github.event.issue.number }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
high
correctness
The
if
condition${{ github.event.issue.pull_request }}
is used to determine if the comment is on a pull request. Ensure that this condition correctly distinguishes between pull request and issue comments, as incorrect logic could lead to jobs not running as expected.