Skip to content

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

Merged
merged 2 commits into from
Jul 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions .github/workflows/tc_agent.yml
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 }}

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.

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 }}

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 an issue. Ensure that this condition correctly distinguishes between issue and pull request comments, as incorrect logic could lead to jobs not running as expected.

runs-on: ubuntu-latest
steps:
- run: |
echo A comment on issue $NUMBER
env:
NUMBER: ${{ github.event.issue.number }}