Add /tactics comment-triggered workflow for servicing PRs#53596
Add /tactics comment-triggered workflow for servicing PRs#53596
Conversation
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/e9426e50-d112-4958-82fc-c010e834b310
lbussell
left a comment
There was a problem hiding this comment.
@marcpopMSFT did you try this on your fork? what was the output?
Not great: https://github.com/marcpopMSFT/sdk/actions/runs/23564038929 |
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/769c23fd-4c04-415c-a470-007b89cbe31b
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/1d3c9fb1-4478-456b-97fd-cf11947df9db
|
@marcpopMSFT what is this trying to do? was this created with github agentic workflows, it looks different to the ones I'm familiar with? |
Cherry-picked changes from marcpopMSFT/sdk main branch: - Switch from GitHub Models to Copilot PAT pool with select-copilot-pat action - Upgrade AI model to gpt-4.1 and improve tactics prompt instructions - Add required Copilot-Integration-Id header to API call - Fix prompt variable reference (split system/user messages) - Update PR description with tactics when no linked issue found - Add pull-requests: write permission for PR body updates Co-authored-by: Marc Paine <marcpop@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bf61f1c to
4e5aa57
Compare
@akoeplinger that was an older version. I went ahead and tried copying how @jeffhandley had done PAT token-based calls in the runtime repo. The latest version is the one using that method of calling AI. I updated the description to cover the goal here and included a few examples that I've tested over on my fork. It seems to be working pretty well over there. Open questions:
|
| env: | ||
| REPO_NAME: ${{ github.event.repository.name }} | ||
| RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| AI_MODEL: gpt-4.1 |
There was a problem hiding this comment.
This model is ~1 year old, why?
The goal of this PR is to add a workflow where users with write permission to the repo can comment /tactics on the PR. This will trigger the workflow to grab an AI enabled PAT, review the PR as well as the originating issue (if there is one), update the description to add the .NET tactics template based on the information gathered, and mark the issue with the servicing-consider label.
Some examples:
marcpopMSFT#5
marcpopMSFT#4
marcpopMSFT#2
A zizmor audit has been run on both yml files with no issues identified.
models: readpermission to fix 401 from GitHub Models APIpull-requests: writetoupdatejob to fix 403 when posting comments on PRs (/issues/{pr_number}/commentsreturns "Resource not accessible by integration" without PR write permission)