Skip to content

Commit 679852e

Browse files
felickzCopilot
andcommitted
Add cache-memory to track checked versions between runs
The workflow now persists state (last checked patch versions, omitted features) across runs via cache-memory, avoiding redundant re-evaluation of previously reviewed release notes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8f77b85 commit 679852e

File tree

2 files changed

+88
-8
lines changed

2 files changed

+88
-8
lines changed

.github/workflows/update-ghas-matrix.lock.yml

Lines changed: 61 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/update-ghas-matrix.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tools:
1111
github:
1212
toolsets: [default]
1313
web-fetch:
14+
cache-memory:
1415
network:
1516
allowed:
1617
- github
@@ -30,39 +31,51 @@ Before making any changes, read the copilot instructions file at `.github/instru
3031

3132
## Your Task
3233

33-
### Step 1: Determine Current State
34+
### Step 1: Load Previous State from Cache
35+
36+
Check cache-memory for a file named `ghas-matrix-state.json`. If it exists, read it. This file tracks:
37+
- `last_checked`: Timestamp of the last run (use filesystem-safe format `YYYY-MM-DD-HH-MM-SS`)
38+
- `latest_major_version`: The highest major GHES version already documented in the matrix
39+
- `checked_patch_versions`: Object mapping each major version to the latest patch version already reviewed (e.g., `{"3.19": "3.19.4", "3.18": "3.18.6"}`)
40+
- `omitted_features`: List of features previously seen but intentionally excluded (to avoid re-evaluation)
41+
42+
If the file does not exist, this is the first run — proceed without prior state.
43+
44+
### Step 2: Determine Current State
3445

3546
Read `GHAS-on-GHES-feature-matrix.md` and identify:
3647
- The **latest major GHES version** currently documented (look at the column headers in the Release Notes table)
3748
- The **oldest version** still in the matrix
3849
- Any versions that have passed their deprecation date
3950

40-
### Step 2: Check for New GHES Versions
51+
### Step 3: Check for New GHES Versions
4152

4253
Fetch the all-releases page to discover if any new GHES versions exist beyond what's documented:
4354
- URL: `https://docs.github.com/en/enterprise-server/admin/all-releases`
4455

4556
Compare the versions listed on that page against the columns in the current matrix. If a new major version exists (e.g., 3.20 when the matrix only goes to 3.19), this is a **new version update**.
4657

47-
### Step 3: Check Minor/Patch Version Release Notes
58+
### Step 4: Check Minor/Patch Version Release Notes
4859

4960
For each currently supported major version in the matrix, check the release notes for significant Advanced Security changes in recent patch releases:
5061
- URL pattern: `https://docs.github.com/en/enterprise-server@<VERSION>/admin/release-notes`
5162

63+
If you have cache state from Step 1, only check patch versions **newer** than what was previously reviewed (e.g., if `checked_patch_versions["3.19"]` is `"3.19.4"`, only look at 3.19.5+). Also skip any features listed in `omitted_features` from cache — they were already evaluated and excluded.
64+
5265
Look specifically for:
5366
- Features moving from Public Preview (☑️) to General Availability (✅)
5467
- New Advanced Security capabilities being backported to existing versions
5568
- Important deprecations or breaking changes
5669

57-
### Step 4: Evaluate Significance
70+
### Step 5: Evaluate Significance
5871

5972
Apply the significance filter from the instructions file:
6073
- **INCLUDE:** New functionality, major gaps addressed, Preview→GA transitions, new CodeQL toolcache versions, partner pattern count changes, new versions, counts
6174
- **EXCLUDE:** Minor bug fixes, new language/framework version support (e.g., Go 1.25, Swift 6.2), simple renames, UI tweaks without functional impact
6275

6376
If there are no significant changes found, **do not create a PR**. Simply note that the matrix is up to date and exit.
6477

65-
### Step 5: Make Updates
78+
### Step 6: Make Updates
6679

6780
If significant changes were found, follow the matrix update rules from the instructions:
6881

@@ -74,7 +87,15 @@ For CodeQL toolcache versions, check: `https://docs.github.com/en/enterprise-ser
7487

7588
For secret scanning partner pattern counts, check: `https://docs.github.com/en/enterprise-server@<VERSION>/code-security/secret-scanning/introduction/supported-secret-scanning-patterns`
7689

77-
### Step 6: Create Pull Request
90+
### Step 7: Save State to Cache
91+
92+
Before finishing (whether or not a PR was created), write the updated state to cache-memory as `ghas-matrix-state.json`:
93+
- `last_checked`: Current timestamp in `YYYY-MM-DD-HH-MM-SS` format (no colons, no T, no Z)
94+
- `latest_major_version`: The highest major GHES version now documented
95+
- `checked_patch_versions`: Updated with the latest patch version reviewed for each major version
96+
- `omitted_features`: Merge any newly omitted features with the previous list
97+
98+
### Step 8: Create Pull Request
7899

79100
Create a pull request with:
80101
- **Title:** "Update GHAS feature matrix for GHES <version(s)>"

0 commit comments

Comments
 (0)