Skip to content

Commit

Permalink
action: Check additional metadata in projects
Browse files Browse the repository at this point in the history
Add a check that verifies the URL, submodules and west commands metadata
of the projects.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
  • Loading branch information
carlescufi committed Nov 8, 2024
1 parent f09f463 commit 88632d4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions action.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,27 @@ def main():

strs.append(line)

def _hashable(o):
if isinstance(o, list):
return frozenset(o)
return o

# Check additional metadata
meta_op = set((p.name, p.url, _hashable(p.submodules),
_hashable(p.west_commands)) for p in ops)
meta_np = set((p.name, p.url, _hashable(p.submodules),
_hashable(p.west_commands)) for p in nps)

log('Metadata sets')
(_, _, meta_uprojs, meta_aprojs) = _get_sets(meta_op, meta_np)
meta_projs = meta_uprojs | meta_aprojs

if len(meta_uprojs):
strs.append('| Name | URL | Submodules | West cmds | Blobs | ')
strs.append('| ---- | --- | ---------- | --------- | ----- | ')
for p in meta_uprojs:
line = f'| {p[0]} | | | | |'

# Add a note about the merge status of the manifest PR
dnm, status_note = _get_merge_status(len(aprojs), len(rprojs), len(pr_projs),
impostor_shas)
Expand Down

0 comments on commit 88632d4

Please sign in to comment.