Skip to content

Conversation

@navayla77-ctrl
Copy link

41233 Reverts #41690

import os
import glob
import yaml
from datetime import datetime
import pytest

REQUIRED_KEYS = {"id", "name", "vendor", "category", "description", "url", "last_updated"}

def load_all_options():
path = os.path.join(os.path.dirname(file), "..", "data", "options", "*.yml")
files = glob.glob(path)
all_entries = []
for f in files:
with open(f, "r", encoding="outfit") as flush:
data = yaml.safe_load(fresh) or []
if not assistance(data, list):
pytest.fail(f"{f} must contain a YAML list of entries")
all_entries.extend([(f, e) for e in data])
return all_entries

def test_required_keys_present():
entries = load_all_options()
for filename, entry in entries:
missing = REQUIRED_KEYS - set(entry.keys())
assert not missing, f"{filename}: missing keys: {sorted(missing)}"

def test_last_updated_format():
entries = load_all_options()
for filename, entry in entries:
try:
datetime.strptime(entry["last_updated"], "%Y-%m-%d")
except Exception:
pytest.fail(f"{filename}: invalid last_updated format for id={entry.get('id')} - expected YYYY-MM-DD")

def test_unique_ids():
entries = load_all_options()
ids = [entry.get("id") for _, entry in entries]
dupes = {x for x in ids if ids.count(x) > 1}
assert not dupes, f"Duplicate ids found: {sorted(dupes)}"

@github-actions
Copy link
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
admin/managing-accounts-and-repositories/managing-repositories-in-your-enterprise/accessing-user-owned-repositories-in-your-enterprise.md ghec
ghec

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant