[Word for Web] Accepting Critique annotation on text with Editor suggestions causes duplicate text insertion #583
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: LLM Issue Analyzer | |
| on: | |
| issues: | |
| types: [opened] | |
| workflow_dispatch: | |
| jobs: | |
| analyze_issues: | |
| runs-on: ubuntu-latest | |
| # Modified condition to include comment events | |
| if: github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'issues' && github.event.action == 'opened') | |
| permissions: | |
| issues: write | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Azure Login | |
| uses: azure/login@v1 | |
| with: | |
| client-id: ${{ secrets.ISSUE_ANALYZE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.ISSUE_ANALYZE_SUBSCRIPTION_ID }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install azure-identity requests | |
| pip install langchain_openai langchain_core | |
| - name: Analyze issue with LLM | |
| id: analyze | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_EVENT_NAME: ${{ github.event_name }} | |
| ISSUE_NUMBER: ${{ github.event_name == 'issue_comment' && github.event.issue.number || github.event.issue.number || '' }} | |
| REPO_OWNER: ${{ github.repository_owner }} | |
| REPO_NAME: ${{ github.repository }} | |
| REGRESSION_ICM_LOGIC_APP_URL: ${{ secrets.REGRESSION_ICM_LOGIC_APP_URL }} | |
| run: | | |
| python issue-scripts/analyze_issue.py |