Skip to content

Commit 4e6578e

Browse files
committed
script: Adapt to MCUboot
Adapts the script to work for MCUboot Signed-off-by: Jamie McCrae <[email protected]>
1 parent 62742e1 commit 4e6578e

File tree

5 files changed

+26
-32
lines changed

5 files changed

+26
-32
lines changed

.github/workflows/update.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ jobs:
3434

3535
- name: Setup the manifest data
3636
run: |
37-
mkdir -p west/submanifests
38-
wget --progress=dot https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/main/west.yml -O west/west.yml
39-
wget --progress=dot https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/main/submanifests/optional.yaml -O west/submanifests/optional.yaml
37+
mkdir -p west
38+
cp west.yml west
4039
west init -l west
41-
west config manifest.group-filter -- +ci,+optional
4240
4341
- name: Update
4442
env:

public/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
}
110110

111111
function prLink(repo, pr, text) {
112-
return `<a href="https://github.com/zephyrproject-rtos/${repo}/pull/${pr}">${text}</a>`;
112+
return `<a href="https://github.com/mcu-tools/${repo}/pull/${pr}">${text}</a>`;
113113
}
114114

115115
function userLink(user, internal = true) {
@@ -283,7 +283,7 @@
283283
const prData = prs[key];
284284
const repo = key.split("/")[0];
285285
const pr = key.split("/")[1];
286-
if (repo !== "zephyr") {
286+
if (repo !== "mcuboot") {
287287
return false;
288288
}
289289
return prData.assignee_names.length === 0 && !prData.draft;
@@ -296,7 +296,7 @@
296296
const prData = prs[key];
297297
const repo = key.split("/")[0];
298298
const pr = key.split("/")[1];
299-
if (repo !== "zephyr") {
299+
if (repo !== "mcuboot") {
300300
return false;
301301
}
302302
const assigneeIsAuthor = prData.assignee_names.includes(prData.author);
@@ -375,8 +375,8 @@
375375
{ id: "approved", caption: "Approved" },
376376
{ id: "previously_approved", caption: "Previously Approved" },
377377
{ id: "commented", caption: "Commented" },
378-
{ id: "unassigned", caption: "Unassigned [zephyr repo only]" },
379-
{ id: "missing_one_approval", caption: "Needs 1 More Approval [zephyr repo only]" },
378+
{ id: "unassigned", caption: "Unassigned [mcuboot repo only]" },
379+
{ id: "missing_one_approval", caption: "Needs 1 More Approval [mcuboot repo only]" },
380380
];
381381

382382
tableConfigs.forEach((config) => {

update_pr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def parse_args(argv):
3939
parser = argparse.ArgumentParser(description=__doc__)
4040

4141
parser.add_argument(
42-
"-o", "--org", default="zephyrproject-rtos", help="Github organisation"
42+
"-o", "--org", default="mcu-tools", help="Github organisation"
4343
)
4444
parser.add_argument(
4545
"-r",
4646
"--repos",
47-
default="zephyr,segger",
47+
default="mcuboot",
4848
help="Github repositories, comma separated",
4949
)
5050

@@ -242,7 +242,7 @@ def main(argv):
242242
# Optimize page size for repos known to have few PRs so that GraphQL query cost is minimized
243243
pr_page_size = (
244244
PAGE_SIZE_ZEPHYR
245-
if (args.org == "zephyrproject-rtos" and repo == "zephyr")
245+
if (args.org == "mcu-tools" and repo == "mcuboot")
246246
else PAGE_SIZE_SMALL_REPOS
247247
)
248248

update_zephyr_pr.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,7 @@
1010

1111
manifest = Manifest.from_file()
1212

13-
repos = [
14-
"action-manifest",
15-
"action-zephyr-setup",
16-
"docker-image",
17-
"example-application",
18-
"infrastructure",
19-
"pr-dashboard",
20-
"sdk-ng",
21-
"zephyr",
22-
]
23-
24-
for project in manifest.get_projects([]):
25-
if not manifest.is_active(project):
26-
continue
27-
28-
if isinstance(project, ManifestProject):
29-
continue
30-
31-
repos.append(project.name)
32-
13+
repos = ["mcuboot"]
3314
repos_arg = ",".join(repos)
3415

3516
subprocess.run(["python", "-u", "update_pr.py", "--repos", repos_arg])

west.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
manifest:
2+
defaults:
3+
remote: upstream
4+
5+
remotes:
6+
- name: upstream
7+
url-base: https://github.com/mcu-tools
8+
9+
projects:
10+
- name: mcuboot
11+
revision: main
12+
path: bootloader/mcuboot
13+
14+
self:
15+
path: pr-dashboard

0 commit comments

Comments
 (0)