Skip to content

Commit 6d64669

Browse files
authored
Merge branch 'main' into armpl-2507
2 parents 5d6e73d + cdbe86d commit 6d64669

File tree

1,136 files changed

+28442
-3593
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,136 files changed

+28442
-3593
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ on:
2121
required: true
2222
HUGO_AUDIO_API:
2323
required: true
24+
HUGO_PHI_ONNX_LLM_API:
25+
required: true
2426
HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID:
2527
required: true
2628
HUGO_FORM_ID_FOR_PROGRAM_SIGNUP:
@@ -73,6 +75,7 @@ jobs:
7375
HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }}
7476
HUGO_RAG_API: ${{ secrets.HUGO_RAG_API }}
7577
HUGO_AUDIO_API: ${{ secrets.HUGO_AUDIO_API }}
78+
HUGO_PHI_ONNX_LLM_API: ${{ secrets.HUGO_PHI_ONNX_LLM_API }}
7679
HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID: ${{ secrets.HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID }}
7780
HUGO_FORM_ID_FOR_PROGRAM_SIGNUP: ${{ secrets.HUGO_FORM_ID_FOR_PROGRAM_SIGNUP }}
7881

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ jobs:
2424
HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }}
2525
HUGO_RAG_API: ${{ secrets.HUGO_RAG_API }}
2626
HUGO_AUDIO_API: ${{ secrets.HUGO_AUDIO_API }}
27+
HUGO_PHI_ONNX_LLM_API: ${{ secrets.HUGO_PHI_ONNX_LLM_API }}
2728
HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID: ${{ secrets.HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID }}
2829
HUGO_FORM_ID_FOR_PROGRAM_SIGNUP: ${{ secrets.HUGO_FORM_ID_FOR_PROGRAM_SIGNUP }}

.github/workflows/production.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ jobs:
2424
HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }}
2525
HUGO_RAG_API: ${{ secrets.HUGO_RAG_API }}
2626
HUGO_AUDIO_API: ${{ secrets.HUGO_AUDIO_API }}
27+
HUGO_PHI_ONNX_LLM_API: ${{ secrets.HUGO_PHI_ONNX_LLM_API }}
2728
HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID: ${{ secrets.HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID }}
2829
HUGO_FORM_ID_FOR_PROGRAM_SIGNUP: ${{ secrets.HUGO_FORM_ID_FOR_PROGRAM_SIGNUP }}
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
name: Update Roadmap Date
2+
3+
on:
4+
pull_request_target:
5+
types: [labeled]
6+
7+
jobs:
8+
update-roadmap-dates:
9+
runs-on: ubuntu-latest
10+
if: |
11+
github.event.label.name == 'awaiting_tech_review' ||
12+
github.event.label.name == 'publish'
13+
14+
permissions:
15+
contents: read
16+
pull-requests: read
17+
repository-projects: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v3
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: '18.x'
27+
28+
- name: Install Octokit
29+
run: npm install @octokit/rest
30+
31+
- name: Update Project Board Dates
32+
uses: actions/github-script@v6
33+
with:
34+
github-token: ${{ secrets.PROJECT_TOKEN }}
35+
script: |
36+
const octokit = github;
37+
38+
const projectNumber = 4;
39+
const orgLogin = 'ArmDeveloperEcosystem';
40+
const prNumber = context.payload.pull_request.number;
41+
const labelName = context.payload.label.name;
42+
43+
async function getProjectItemForPR() {
44+
const projectQuery = `
45+
query {
46+
organization(login: "${orgLogin}") {
47+
projectV2(number: ${projectNumber}) {
48+
id
49+
}
50+
}
51+
}
52+
`;
53+
const projectResponse = await octokit.graphql(projectQuery);
54+
const project = projectResponse.organization?.projectV2;
55+
if (!project) throw new Error("Project not found for organization.");
56+
const projectId = project.id;
57+
58+
let cursor = null;
59+
let itemId = null;
60+
do {
61+
const prQuery = `
62+
query($after: String) {
63+
organization(login: "${orgLogin}") {
64+
projectV2(number: ${projectNumber}) {
65+
items(first: 100, after: $after) {
66+
nodes {
67+
id
68+
content {
69+
... on PullRequest {
70+
number
71+
repository {
72+
name
73+
}
74+
}
75+
}
76+
}
77+
pageInfo {
78+
hasNextPage
79+
endCursor
80+
}
81+
}
82+
}
83+
}
84+
}
85+
`;
86+
const prResponse = await octokit.graphql(prQuery, { after: cursor });
87+
const items = prResponse.organization.projectV2.items.nodes;
88+
89+
const foundItem = items.find(item =>
90+
item.content &&
91+
item.content.number === prNumber &&
92+
item.content.repository.name === context.repo.repo
93+
);
94+
95+
if (foundItem) {
96+
itemId = foundItem.id;
97+
break;
98+
}
99+
100+
cursor = prResponse.organization.projectV2.items.pageInfo.endCursor;
101+
} while (cursor);
102+
103+
return { projectId, itemId };
104+
}
105+
106+
async function getFieldId(projectId, fieldName) {
107+
const fieldsQuery = `
108+
query {
109+
node(id: "${projectId}") {
110+
... on ProjectV2 {
111+
fields(first: 50) {
112+
nodes {
113+
... on ProjectV2Field {
114+
id
115+
name
116+
dataType
117+
}
118+
}
119+
}
120+
}
121+
}
122+
}
123+
`;
124+
125+
const fieldsResponse = await octokit.graphql(fieldsQuery);
126+
const fields = fieldsResponse.node?.fields?.nodes || [];
127+
const field = fields.find(f => f.name === fieldName && f.dataType === 'DATE');
128+
129+
return field ? field.id : null;
130+
}
131+
132+
async function updateDateField(projectId, itemId, fieldId, date) {
133+
const mutation = `
134+
mutation {
135+
updateProjectV2ItemFieldValue(
136+
input: {
137+
projectId: "${projectId}"
138+
itemId: "${itemId}"
139+
fieldId: "${fieldId}"
140+
value: { date: "${date}" }
141+
}
142+
) {
143+
projectV2Item {
144+
id
145+
}
146+
}
147+
}
148+
`;
149+
150+
const result = await octokit.graphql(mutation);
151+
console.log('Mutation result:', result);
152+
return result;
153+
}
154+
155+
async function main() {
156+
try {
157+
const { projectId, itemId } = await getProjectItemForPR();
158+
if (!itemId) {
159+
console.log('PR not found in project board');
160+
return;
161+
}
162+
163+
const today = new Date().toISOString().split('T')[0];
164+
165+
if (labelName === 'awaiting_tech_review') {
166+
const startDateFieldId = await getFieldId(projectId, 'Start Date');
167+
if (startDateFieldId) {
168+
await updateDateField(projectId, itemId, startDateFieldId, today);
169+
console.log('Updated Start Date to', today);
170+
} else {
171+
console.log('Start Date field not found');
172+
}
173+
} else if (labelName === 'publish') {
174+
const endDateFieldId = await getFieldId(projectId, 'Publish Date');
175+
if (endDateFieldId) {
176+
await updateDateField(projectId, itemId, endDateFieldId, today);
177+
console.log('Updated Publish Date to', today);
178+
} else {
179+
console.log('Publish Date field not found');
180+
}
181+
} else {
182+
console.log('No action taken for label:', labelName);
183+
}
184+
} catch (error) {
185+
console.error('Error updating project board:', error);
186+
core.setFailed(`Error updating project board: ${error.message}`);
187+
}
188+
}
189+
190+
main();

.github/workflows/test-lp.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,40 @@ jobs:
1414
hugo
1515
- name: Get all changed markdown files
1616
id: changed-markdown-files
17-
uses: step-security/changed-files@v45
17+
uses: tj-actions/changed-files@v46
1818
with:
1919
files: |
20-
**.md
20+
content/**/**.md
21+
- name: Check for capital letters or spaces in content directory
22+
run: |
23+
echo "Checking for capital letters or spaces in content directory paths (excluding file extensions)..."
24+
25+
tmpfile=$(mktemp)
26+
27+
git diff --name-only origin/${{ github.base_ref }}...HEAD |
28+
grep '^content/' |
29+
while read -r path; do
30+
name=$(basename "$path")
31+
32+
# Strip file extension if it exists
33+
base="${name%.*}"
34+
35+
if [[ "$base" =~ [A-Z] || "$base" =~ [[:space:]] ]]; then
36+
echo "Invalid name: $path"
37+
echo "$path" >> "$tmpfile"
38+
fi
39+
done
40+
41+
if [[ -s "$tmpfile" ]]; then
42+
echo "❌ One or more files or directories in 'content/' contain capital letters or spaces (excluding extensions):"
43+
cat "$tmpfile"
44+
rm "$tmpfile"
45+
exit 1
46+
else
47+
rm "$tmpfile"
48+
echo "✅ No capital letters or spaces found in 'content/' paths."
49+
fi
50+
2151
- name: Install dependencies
2252
if: steps.changed-markdown-files.outputs.any_changed == 'true'
2353
run: pip install -r tools/requirements.txt
@@ -26,7 +56,7 @@ jobs:
2656
if: steps.changed-markdown-files.outputs.any_changed == 'true'
2757
# Run the test suite
2858
run: |
29-
set -o pipefail; ./tools/test_lp.sh ${{ steps.changed-markdown-files.outputs.all_changed_files }} 2>&1 | tee test-lp-output.txt
59+
set -o pipefail; ./tools/test_lp.sh ${{ steps.changed-markdown-files.outputs.all_changed_files }} 2>&1 | tee test-lp-output.txt
3060
- name: Parse test suite errors
3161
id: test-suite-state
3262
if: success()

.github/workflows/update-roadmap-project-dates.yml

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)