From a52569ad1cb40ada98a1c89b8038c5b5183f177e Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Thu, 10 Jul 2025 12:11:32 +0300 Subject: [PATCH 1/2] trigger type --- .github/workflows/tc_agent.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tc_agent.yml b/.github/workflows/tc_agent.yml index 3dd9d59..140dc04 100644 --- a/.github/workflows/tc_agent.yml +++ b/.github/workflows/tc_agent.yml @@ -1,12 +1,8 @@ -name: TC Action Agent +name: TC Action Agent - Do It on: issue_comment: - types: - - created - -permissions: - pull-requests: write + types: [created, edited] jobs: tc-acion-agent: From d7bbbb8379533d7d6183c29f69cc74fbf9f7d009 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Thu, 10 Jul 2025 12:30:16 +0300 Subject: [PATCH 2/2] simple trigger on comments --- .github/workflows/tc_agent.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tc_agent.yml b/.github/workflows/tc_agent.yml index 140dc04..705d252 100644 --- a/.github/workflows/tc_agent.yml +++ b/.github/workflows/tc_agent.yml @@ -1,18 +1,26 @@ name: TC Action Agent - Do It -on: - issue_comment: - types: [created, edited] +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 }} + runs-on: ubuntu-latest + steps: + - run: | + echo A comment on issue $NUMBER + env: + NUMBER: ${{ github.event.issue.number }}