Skip to content

Commit d7fac8b

Browse files
chagongCopilot
andcommitted
ci: queue team-memory maintenance through Java Pack
Replace direct source maintenance with the scoped, pinned coordinator dispatcher and document independent caller and central authentication prerequisites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent bcae605 commit d7fac8b

2 files changed

Lines changed: 70 additions & 30 deletions

File tree

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
1-
name: Update IssueLens Team Memory
1+
name: Queue IssueLens Team Memory (opt-in)
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

15-
concurrency:
16-
group: issuelens-${{ github.repository }}-team-memory-${{ github.event.after || inputs.pull_request_number || github.run_id }}
17-
cancel-in-progress: false
18-
199
jobs:
2010
team-memory:
2111
if: >-
22-
${{ vars.ISSUELENS_TEAM_MEMORY_ENABLED == 'true' &&
23-
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) &&
24-
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
12+
vars.ISSUELENS_TEAM_MEMORY_ENABLED == 'true' &&
13+
github.repository == 'microsoft/java-debug' &&
14+
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) &&
15+
github.event_name == 'push' &&
16+
github.workflow_sha == github.sha &&
17+
github.event.created == false &&
18+
github.event.deleted == false &&
19+
github.event.forced == false
2520
runs-on: ubuntu-latest
26-
timeout-minutes: 30
27-
permissions:
28-
contents: read
29-
pull-requests: read
30-
id-token: write
21+
timeout-minutes: 10
3122
steps:
32-
- name: Maintain IssueLens team memory
33-
uses: microsoft/IssueLens/.github/actions/issuelens@2b5317815e15179899014a02c41678620ce2d390
23+
- name: Create coordinator dispatch token
24+
id: dispatch-token
25+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
26+
with:
27+
client-id: ${{ vars.ISSUELENS_DISPATCH_APP_CLIENT_ID }}
28+
private-key: ${{ secrets.ISSUELENS_DISPATCH_APP_PRIVATE_KEY }}
29+
owner: microsoft
30+
repositories: vscode-java-pack
31+
permission-contents: read
32+
permission-actions: write
33+
34+
- name: Queue team-memory request
35+
uses: microsoft/IssueLens/.github/actions/queue-team-memory@a81d2d96167fc0e69ac631c2edc85f858e693289
3436
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
37+
dispatch-token: ${{ steps.dispatch-token.outputs.token }}
38+
coordinator-repository: microsoft/vscode-java-pack
39+
coordinator-workflow: team-memory-coordinator.yml
40+
coordinator-ref: main
41+
workflow-inputs: >-
42+
{"source_repository":"${{ github.repository }}",
43+
"source_run_id":"${{ github.run_id }}",
44+
"source_run_attempt":"${{ github.run_attempt }}",
45+
"push_before":"${{ github.event.before }}",
46+
"push_after":"${{ github.sha }}"}

‎README.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,43 @@ Once `eclipse.jdt.ls` launched, the client can send a [Command](https://microsof
6565
The response to this request will contain a port number on which the debug adapter is listening, and to which a client implementing the debug-adapter protocol can connect to.
6666

6767

68+
## IssueLens team-memory maintenance
69+
70+
[The source workflow](.github/workflows/team-memory-post-merge.yml) queues eligible
71+
default-branch pushes through the `team-memory-coordinator.yml` workflow on `main`
72+
in `microsoft/vscode-java-pack`. The coordinator owns source validation, the
73+
shared-wiki queue, and maintenance; issue triage is unchanged.
74+
75+
Before merging this migration with the existing
76+
`ISSUELENS_TEAM_MEMORY_ENABLED` variable set to `true`, configure both independent
77+
authentication paths. An enabled source switches immediately from direct
78+
maintenance to queue dispatch:
79+
80+
- **Source dispatch:** set the repository variable `ISSUELENS_DISPATCH_APP_CLIENT_ID`
81+
and secret `ISSUELENS_DISPATCH_APP_PRIVATE_KEY` for a dedicated GitHub App
82+
installed only on `microsoft/vscode-java-pack`, with Contents read and Actions
83+
write permissions. The pinned token action accepts the client ID through its
84+
`client-id` input and narrows the token to that repository and those permissions.
85+
The source `GITHUB_TOKEN` cannot dispatch across repositories. Do not reuse the
86+
hosted IssueLens App key or the central source-read App credentials.
87+
- **Central source reads:** Java Pack must separately configure the secrets
88+
`ISSUELENS_SOURCE_READ_APP_CLIENT_ID` and `ISSUELENS_SOURCE_READ_APP_PRIVATE_KEY`
89+
for its source-read App, with Actions, Contents, and Pull requests read access
90+
to selected source repositories including `microsoft/java-debug`. A successful
91+
coordinator run for Java Pack itself does not verify this external access.
92+
93+
Only ordinary, non-created, non-deleted, non-forced pushes from the actual source
94+
repository/default branch with matching workflow and head SHAs are queued.
95+
The five string inputs identify the source run/attempt and the requested commit
96+
range. `push_after` is verified against the run; `push_before` authorizes ancestor
97+
reconciliation, not attested original-event provenance.
98+
99+
For manual merged-PR maintenance, use **Run workflow** on the central coordinator
100+
with `source_repository: microsoft/java-debug` and `pull_request_number`; there
101+
is no local manual invocation path. Dispatch acceptance is not maintenance
102+
completion. Inspect central runs before retrying an ambiguous dispatch failure.
103+
104+
68105
License
69106
-------
70107
EPL 1.0, See [LICENSE](LICENSE.txt) file.

0 commit comments

Comments
 (0)