Skip to content

Align the organization profile with repository maturity (#8) #4

Align the organization profile with repository maturity (#8)

Align the organization profile with repository maturity (#8) #4

name: Community Health CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
issue-forms:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Issue form YAML
shell: ruby {0}
run: |
require "yaml"
paths = Dir["ISSUE_TEMPLATE/*.yml"].sort
abort "no issue forms found" if paths.empty?
paths.each do |path|
doc = YAML.safe_load(File.read(path), aliases: true)
abort "#{path}: root must be a mapping" unless doc.is_a?(Hash)
next if path.end_with?("config.yml")
%w[name description body].each do |key|
abort "#{path}: missing #{key}" unless doc[key]
end
abort "#{path}: body must be an array" unless doc["body"].is_a?(Array)
end
puts "validated #{paths.length} issue-form files"
profile-maturity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate organization profile maturity claims
shell: bash
run: |
set -euo pipefail
test -s profile/README.md
test -s REPOSITORY_MATURITY.md
grep -Fq '1.0.0-draft' profile/README.md
grep -Fq 'Prerelease Alpha' profile/README.md
grep -Fq 'Scaffold · Planned' profile/README.md
grep -Fq 'CoreLinkPlatform/platform' REPOSITORY_MATURITY.md
if grep -Fq 'CoreLinkPlatform/examples' profile/README.md; then
echo "organization profile references the unavailable examples repository" >&2
exit 1
fi