| 84 | |
| 85 | |
| 86 | def format_comment(missing_types: set[str], missing_stdvers: set[str]) -> str: |
| 87 | lines = [ |
| 88 | MARKER, |
| 89 | "### Infra `settings.yml` may need updating", |
| 90 | "", |
| 91 | "This PR adds values that are not currently listed in " |
| 92 | "[`compiler-explorer/infra/init/settings.yml`]" |
| 93 | "(https://github.com/compiler-explorer/infra/blob/main/init/settings.yml):", |
| 94 | "", |
| 95 | ] |
| 96 | if missing_types: |
| 97 | lines.append("**New `compilerType` values:**") |
| 98 | lines.extend(f"- [ ] `{t}`" for t in sorted(missing_types)) |
| 99 | lines.append("") |
| 100 | if missing_stdvers: |
| 101 | lines.append("**New `stdver` values:**") |
| 102 | lines.extend(f"- [ ] `{s}`" for s in sorted(missing_stdvers)) |
| 103 | lines.append("") |
| 104 | lines.append( |
| 105 | "Please open a matching PR in " |
| 106 | "[compiler-explorer/infra](https://github.com/compiler-explorer/infra) " |
| 107 | "to add these to `init/settings.yml` — Conan library builds will fail " |
| 108 | "otherwise." |
| 109 | ) |
| 110 | return "\n".join(lines) + "\n" |
| 111 | |
| 112 | |
| 113 | def main() -> int: |