Skip to content

Commit 16eed35

Browse files
chagongCopilot
andauthored
Queue team-memory updates through Java Pack (#1106)
Route team-memory updates through the Java Pack coordinator. Workflow-only change; preserve source opt-in and scoped dispatch safeguards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent eb3fba0 commit 16eed35

1 file changed

Lines changed: 33 additions & 26 deletions

File tree

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,50 @@
1-
name: Update IssueLens Team Memory
1+
name: Queue IssueLens Team Memory
22

33
on:
44
push:
55
branches: [main]
6-
workflow_dispatch:
7-
inputs:
8-
pull_request_number:
9-
description: 'Merged pull request number to learn from'
10-
required: true
11-
type: string
126

137
permissions: {}
148

159
concurrency:
16-
group: issuelens-${{ github.repository }}-team-memory-${{ github.event.after || inputs.pull_request_number || github.run_id }}
10+
group: issuelens-${{ github.repository }}-team-memory-${{ github.sha }}
1711
cancel-in-progress: false
1812

1913
jobs:
20-
team-memory:
14+
dispatch:
2115
if: >-
2216
${{ vars.ISSUELENS_TEAM_MEMORY_ENABLED == 'true' &&
17+
github.repository == 'microsoft/vscode-java-dependency' &&
2318
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) &&
24-
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
19+
github.event_name == 'push' &&
20+
github.workflow_sha == github.sha &&
21+
github.event.created == false &&
22+
github.event.deleted == false &&
23+
github.event.forced == false }}
2524
runs-on: ubuntu-latest
26-
timeout-minutes: 30
27-
permissions:
28-
contents: read
29-
pull-requests: read
30-
id-token: write
25+
timeout-minutes: 10
3126
steps:
32-
- name: Maintain IssueLens team memory
33-
uses: microsoft/IssueLens/.github/actions/issuelens@2b5317815e15179899014a02c41678620ce2d390
27+
- name: Get token to dispatch the Java Pack coordinator
28+
id: dispatch-token
29+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
3430
with:
35-
request-type: team-memory
36-
pull-request-number: ${{ inputs.pull_request_number }}
37-
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
38-
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
39-
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
40-
agent-url: ${{ secrets.ISSUELENS_AGENT_URL }}
41-
agent-scope: ${{ secrets.ISSUELENS_AGENT_SCOPE }}
42-
output-mode: activity
43-
summary-mode: status
31+
client-id: ${{ vars.ISSUELENS_DISPATCH_APP_CLIENT_ID }}
32+
private-key: ${{ secrets.ISSUELENS_DISPATCH_APP_PRIVATE_KEY }}
33+
owner: microsoft
34+
repositories: vscode-java-pack
35+
permission-contents: read
36+
permission-actions: write
37+
38+
- name: Queue team-memory request
39+
uses: microsoft/IssueLens/.github/actions/queue-team-memory@a81d2d96167fc0e69ac631c2edc85f858e693289
40+
with:
41+
dispatch-token: ${{ steps.dispatch-token.outputs.token }}
42+
coordinator-repository: microsoft/vscode-java-pack
43+
coordinator-workflow: team-memory-coordinator.yml
44+
coordinator-ref: main
45+
workflow-inputs: >-
46+
{"source_repository":"${{ github.repository }}",
47+
"source_run_id":"${{ github.run_id }}",
48+
"source_run_attempt":"${{ github.run_attempt }}",
49+
"push_before":"${{ github.event.before }}",
50+
"push_after":"${{ github.sha }}"}

0 commit comments

Comments
 (0)