Skip to content

Commit c03f7bc

Browse files
Merge pull request #1845 from ArmDeveloperEcosystem/main
Production update
2 parents f3a7dec + c0e00ea commit c03f7bc

File tree

123 files changed

+2102
-1544
lines changed

Some content is hidden

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

123 files changed

+2102
-1544
lines changed
Lines changed: 153 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,191 @@
1-
name: Update Project Fields on Label and Status Change
1+
name: Update Roadmap Dates
22

33
on:
44
pull_request:
5-
types:
6-
- labeled
7-
workflow_dispatch:
5+
types: [labeled]
86

97
jobs:
10-
update-project-dates:
8+
update-roadmap-dates:
119
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+
1219
steps:
13-
- name: Check out code
20+
- name: Checkout repository
1421
uses: actions/checkout@v3
1522

16-
- name: Run GitHub Script
17-
uses: actions/github-script@v7
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: Debug Token
32+
run: echo "Token is set"
33+
env:
34+
PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
35+
36+
- name: Update Project Board Dates
37+
uses: actions/github-script@v6
1838
with:
19-
github-token: ${{ secrets.GITHUB_TOKEN }} # replace with your token secret name
39+
PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
2040
script: |
21-
const projectId = "PVT_kwDOBVR2-M4A2QVf"; // Replace with your actual project node ID
22-
const fieldStartId = "PVTF_lADOBVR2-M4A2QVfzgrvSF4"; // Replace with Start Date field node ID
23-
const fieldPublishId = "PVTF_lADOBVR2-M4A2QVfzgrvSMA"; // Replace with Publish Date field node ID
41+
const { Octokit } = require('@octokit/rest');
42+
const octokit = new Octokit({ auth:process.env.GITHUB_TOKEN });
2443
25-
const label = context.payload.label ? context.payload.label.name : null;
44+
const projectNumber = 4; // Your project number
45+
const orgName = 'ArmDeveloperEcosystem';
46+
const prNumber = context.payload.pull_request.number;
47+
const labelName = context.payload.label.name;
2648
27-
if (!label) {
28-
console.log("No label found in the payload.");
29-
return;
30-
}
31-
const prNodeId = context.payload.pull_request.node_id;
32-
33-
// Get the project item for this PR
34-
const { repository } = await github.graphql(`
35-
query($owner: String!, $repo: String!, $prNumber: Int!) {
36-
repository(owner: $owner, name: $repo) {
37-
pullRequest(number: $prNumber) {
38-
projectItems(first: 10) {
39-
nodes {
49+
async function getProjectItemForPR() {
50+
// Get the project ID
51+
const projectQuery = `
52+
query {
53+
organization(login:"${orgName}") {
54+
projectV2(number:${projectNumber}) {
4055
id
41-
fieldValues(first: 10) {
56+
}
57+
}
58+
}
59+
`;
60+
61+
const projectResponse = await octokit.graphql(projectQuery);
62+
const projectId = projectResponse.organization.projectV2.id;
63+
64+
// Find the PR in the project
65+
const prQuery = `
66+
query {
67+
organization(login:"${orgName}") {
68+
projectV2(number:${projectNumber}) {
69+
items(first:100) {
70+
nodes {
71+
id
72+
content {
73+
... on PullRequest {
74+
number
75+
repository {
76+
name
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}
83+
}
84+
}
85+
`;
86+
87+
const prResponse = await octokit.graphql(prQuery);
88+
const items = prResponse.organization.projectV2.items.nodes;
89+
90+
// Find the item that corresponds to this PR
91+
const item = items.find(item =>
92+
item.content &&
93+
item.content.number === prNumber &&
94+
item.content.repository.name === context.repo.repo
95+
);
96+
97+
return { projectId, itemId:item ? item.id:null };
98+
}
99+
100+
async function getFieldId(projectId, fieldName) {
101+
const fieldsQuery = `
102+
query {
103+
node(id:"${projectId}") {
104+
... on ProjectV2 {
105+
fields(first:20) {
42106
nodes {
43-
field {
107+
... on ProjectV2Field {
108+
id
44109
name
45110
}
46-
... on ProjectV2ItemFieldDateValue {
47-
date
111+
... on ProjectV2IterationField {
112+
id
113+
name
48114
}
49-
... on ProjectV2ItemFieldTextValue {
50-
text
115+
... on ProjectV2SingleSelectField {
116+
id
117+
name
51118
}
52-
... on ProjectV2ItemFieldSingleSelectValue {
119+
... on ProjectV2DateField {
120+
id
53121
name
54122
}
55123
}
56124
}
57125
}
58-
}
59-
60-
`, {
61-
owner: context.repo.owner,
62-
repo: context.repo.repo,
63-
prNumber: context.issue.number,
64-
});
65-
66-
const item = repository.pullRequest.projectItems.nodes[0];
67-
if (!item) {
68-
console.log("No project item found for this PR.");
69-
return;
70-
}
126+
}
127+
}
128+
`;
71129
72-
const itemId = item.id;
130+
const fieldsResponse = await octokit.graphql(fieldsQuery);
131+
const fields = fieldsResponse.node.fields.nodes;
132+
const field = fields.find(f => f.name === fieldName);
73133
74-
const today = new Date().toISOString().split("T")[0]; // e.g., "2025-04-10"
134+
return field ? field.id :null;
135+
}
75136
76-
if (label === "awaiting_tech_review") {
77-
console.log("Setting Start Date...");
78-
await github.graphql(`
137+
async function updateDateField(projectId, itemId, fieldId, date) {
138+
const mutation = `
79139
mutation {
80-
updateProjectV2ItemFieldValue(input: {
81-
projectId: "${projectId}",
82-
itemId: "${itemId}",
83-
fieldId: "${fieldStartId}",
84-
value: { date: "${today}" }
85-
}) {
140+
updateProjectV2ItemFieldValue(
141+
input:{
142+
projectId:"${projectId}"
143+
itemId:"${itemId}"
144+
fieldId:"${fieldId}"
145+
value:{
146+
date:"${date}"
147+
}
148+
}
149+
) {
86150
projectV2Item {
87151
id
88152
}
89153
}
90154
}
91-
`);
155+
`;
156+
157+
return await octokit.graphql(mutation);
92158
}
93159
94-
if (label === "publish") {
95-
console.log("Setting Publish Date...");
96-
await github.graphql(`
97-
mutation {
98-
updateProjectV2ItemFieldValue(input: {
99-
projectId: "${projectId}",
100-
itemId: "${itemId}",
101-
fieldId: "${fieldPublishId}",
102-
value: { date: "${today}" }
103-
}) {
104-
projectV2Item {
105-
id
106-
}
160+
async function main() {
161+
try {
162+
const { projectId, itemId } = await getProjectItemForPR();
163+
if (!itemId) {
164+
console.log('PR not found in project board');
165+
return;
166+
}
167+
168+
const today = new Date().toISOString().split('T')[0]; // YYYY-MM-DD format
169+
170+
if (labelName === 'awaiting_tech_review') {
171+
const startDateFieldId = await getFieldId(projectId, 'Start Date');
172+
if (startDateFieldId) {
173+
await updateDateField(projectId, itemId, startDateFieldId, today);
174+
console.log('Updated Start Date to', today);
175+
} else {
176+
console.log('Start Date field not found');
177+
}
178+
} else if (labelName === 'publish') {
179+
const publishDateFieldId = await getFieldId(projectId, 'Publish Date');
180+
if (publishDateFieldId) {
181+
await updateDateField(projectId, itemId, publishDateFieldId, today);
182+
console.log('Updated Publish Date to', today);
183+
} else {
184+
console.log('Publish Date field not found');
107185
}
108186
}
109-
`);
187+
} catch (error) {
188+
console.error('Error updating project board:', error);
189+
core.setFailed(`Error updating project board:${error.message}`);
190+
}
110191
}

.wordlist.txt

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3966,4 +3966,46 @@ mesaros
39663966
multilayer
39673967
renderbuffer
39683968
rosdep
3969-
suboptimally
3969+
suboptimally
3970+
AMQP
3971+
AirQualityIndex
3972+
AzureFunctions
3973+
AzureIoT
3974+
AzureWebJobsStorage
3975+
CosmosDBOutput
3976+
DOCUMENTDB
3977+
IoTDatabaee
3978+
IoTDatabase
3979+
IoTHubInput
3980+
IoTStreamAnalyticsJob
3981+
IoTTemperatureAlertFunc
3982+
IsEncrypted
3983+
LRS
3984+
RUs
3985+
SENDGRID
3986+
SendGrid
3987+
SendGridAPIClient
3988+
Servleress
3989+
Twilio
3990+
armiotcosmosdb
3991+
armiotstorage
3992+
asyncio
3993+
autogenerated
3994+
averageTemperature
3995+
averagetemperature
3996+
azcosmosdb
3997+
cardinality
3998+
cosmosdb
3999+
declaratively
4000+
devguide
4001+
differentiator
4002+
etag
4003+
getTempBtn
4004+
hotspots
4005+
iothubowner
4006+
schemas
4007+
sdks
4008+
sendgrid
4009+
soafee
4010+
timestamping
4011+
transactional

content/install-guides/armpl.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,19 @@ The instructions shown below are for deb based installers for GCC users.
122122
In a terminal, run the command shown below to download the Debian package:
123123

124124
```bash
125-
wget https://developer.arm.com/-/cdn-downloads/permalink/Arm-Performance-Libraries/Version_25.04/arm-performance-libraries_25.04_deb_gcc.tar
125+
wget https://developer.arm.com/-/cdn-downloads/permalink/Arm-Performance-Libraries/Version_25.04.1/arm-performance-libraries_25.04.1_deb_gcc.tar
126126
```
127127

128128
Use `tar` to extract the file and then change directory:
129129

130130
```bash
131-
tar xf arm-performance-libraries_25.04_deb_gcc.tar
131+
tar xf arm-performance-libraries_25.04.1_deb_gcc.tar
132132
```
133133

134134
Run the installation script as a super user:
135135

136136
```bash
137-
sudo ./arm-performance-libraries_25.04_deb/arm-performance-libraries_25.04_deb.sh --accept
137+
sudo ./arm-performance-libraries_25.04.1_deb/arm-performance-libraries_25.04.1_deb.sh --accept
138138
```
139139

140140
Using the `--accept` switch you automatically accept the End User License Agreement and the packages are installed to the `/opt/arm` directory.
@@ -150,8 +150,8 @@ Add the Arm Performance Libraries `apt` package repository to your system:
150150
```bash
151151
sudo apt update
152152
. /etc/os-release
153-
curl https://developer.arm.com/packages/arm-toolchains:$ID-${VERSION_ID%%.*}/$VERSION_CODENAME/Release.key | sudo tee /etc/apt/trusted.gpg.d/developer-arm-com.asc
154-
echo "deb https://developer.arm.com/packages/arm-toolchains:$ID-${VERSION_ID%%.*}/$VERSION_CODENAME/ ./" | sudo tee /etc/apt/sources.list.d/developer-arm-com.list
153+
curl "https://developer.arm.com/packages/arm-toolchains:${NAME,,}-${VERSION_ID/%.*/}/${VERSION_CODENAME}/Release.key" | sudo tee /etc/apt/trusted.gpg.d/developer-arm-com.asc
154+
echo "deb https://developer.arm.com/packages/arm-toolchains:${NAME,,}-${VERSION_ID/%.*/}/${VERSION_CODENAME}/ ./" | sudo tee /etc/apt/sources.list.d/developer-arm-com.list
155155
sudo apt update
156156
```
157157

@@ -190,13 +190,13 @@ module avail
190190
The output should be similar to:
191191

192192
```output
193-
armpl/25.04.0_gcc
193+
armpl/25.04.1_gcc
194194
```
195195

196196
Load the appropriate module:
197197

198198
```console
199-
module load armpl/25.04.0_gcc
199+
module load armpl/25.04.1_gcc
200200
```
201201

202202
You can now compile and test the examples included in the `/opt/arm/<armpl_dir>/examples/`, or `<install_dir>/<armpl_dir>/examples/` directory, if you have installed to a different location than the default.

0 commit comments

Comments
 (0)