diff --git a/.github/workflows/all-patterns-listed.yml b/.github/workflows/all-patterns-listed.yml new file mode 100644 index 000000000..6765d0269 --- /dev/null +++ b/.github/workflows/all-patterns-listed.yml @@ -0,0 +1,46 @@ +# Check if all patterns are listed in README.md +name: All Patterns Listed + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + all-patterns-listed: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Check if all patterns are listed in README.md + run: | + README="README.md" + + # Ensure README.md exists + if [[ ! -f "$README" ]]; then + echo "Error: $README not found!" + exit 1 + fi + + missing=0 + + for file in patterns/*/*.md; do + if grep -qF "$file" "$README"; then + echo "✔ Found: $file" + else + echo "✘ Missing: $file" + echo "✘ Pattern file not listed in README.md: $file" >> $GITHUB_STEP_SUMMARY + missing=$((missing + 1)) + fi + done + + if [[ $missing -gt 0 ]]; then + echo "Some patterns are missing from $README." + exit 1 + else + echo "All patterns are listed in $README." + exit 0 + fi diff --git a/README.md b/README.md index 8639923c4..fa59da85b 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ Our mission * [Require InnerSource before Open Source](/patterns/1-initial/innersource-before-open-source.md) - *Maintaining and managing open source projects can be challenging for organizations, due to a lack of internal infrastructure and people with the knowledge of the required collaboration practices. By requiring projects to be InnerSource before becoming open source, teams have time to establish the necessary internal support, governance, and collaboration skills needed for successful community engagement.* * [AI Code Generation Context](patterns/1-initial/ai-code-generation-context.md) - *AI tools generate code that diverges from project standards and architectural patterns. Provide an AI Code Generation Context within the repositories to guide AI tools in producing contributions that align with existing project conventions, reducing review friction and maintaining code consistency.* * [InnerSource as a Career Booster](patterns/1-initial/innersource-as-career-booster.md) - *Many employees wonder how contributing to InnerSource projects benefits their careers beyond their immediate team objectives. By engaging in InnerSource, individuals expand their skills, grow their network, increase visibility across the organization, and unlock new career opportunities.* +* [Migrating from InnerSource to Open Source](patterns/1-initial/migrating-from-innersource-to-open-source.md) - *When an InnerSource project succeeds internally and meets criteria for external release, organizations often lack a structured approach for the transition. Establish a process that addresses legal, security, governance, and community readiness to transition the project to open source while maintaining its internal value.*