Skip to content

Commit

Permalink
NEW Migrate logic from workflows for reasoning about repository metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed May 6, 2024
1 parent ea552a5 commit 95cafa7
Show file tree
Hide file tree
Showing 11 changed files with 1,563 additions and 20 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# http://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
ci:
name: CI
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor/
composer.lock
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,16 @@
Metadata and some supporting PHP logic for determining which branches of various GitHub repositories relate to which versions of Silverstripe CMS.

> [!IMPORTANT]
> Only the main branch of this repository is maintained.
> Only the `main` branch of this repository is maintained.
You can fetch the JSON by simply fetching the raw copy of `repositories.json` file, e.g. <https://raw.githubusercontent.com/silverstripe/supported-modules/main/repositories.json>

It's known to be used in the following repositories:

- [silverstripe/cow](https://github.com/silverstripe/cow)
- [silverstripe/tx-translator](https://github.com/silverstripe/silverstripe-tx-translator/)
- [bringyourownideas/silverstripe-maintainence](https://github.com/bringyourownideas/silverstripe-maintenance)
- [silverstripe/github-issue-search-client](https://github.com/silverstripe/github-issue-search-client)
- [silverstripe/module-standardiser](https://github.com/silverstripe/module-standardiser)
You can fetch the JSON by simply fetching the raw copy of `repositories.json` file, e.g. <https://raw.githubusercontent.com/silverstripe/supported-modules/main/repositories.json>, though you're encouraged to use composer to pull in the data instead where appropriate.

## Format

There are several sections in the `repositories.json` file, denoting different categories of repositories:

- `supportedModules`: Repositories representing supported modules. If cow cares about it, it should probably be in this category.
- `workflow`: Repositories which hold GitHub actions and workflows. Note that this section omits the `packagist` key.
- `workflow`: Repositories which hold GitHub actions and workflows.
- `tooling`: Repositories used to help streamline Silverstripe CMS maintenance
- `misc`: All repositories we need to track which don't fit in one of the above categories.

Expand Down
17 changes: 17 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "silverstripe/supported-modules",
"description": "Metadata about Silverstripe CMS supported modules and other repositories maintained by Silverstripe",
"autoload": {
"psr-4": {
"SilverStripe\\SupportedModules\\": "src/",
"SilverStripe\\SupportedModules\\Tests\\": "tests/"
}
},
"require": {
"php": "^8.1",
"composer/semver": "^3.4"
},
"require-dev": {
"phpunit/phpunit": "^9.6"
}
}
8 changes: 8 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true">
<testsuites>
<testsuite name="Default">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>
26 changes: 17 additions & 9 deletions repositories.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
}
},
{
"github": "bringyourownideas/silverstripe-packagist-update-checker",
"packagist": "bringyourownideas/silverstripe-packagist-update-checker",
"github": "bringyourownideas/silverstripe-composer-update-checker",
"packagist": "bringyourownideas/silverstripe-composer-update-checker",
"githubId": 41240800,
"isCore": false,
"lockstepped": false,
Expand Down Expand Up @@ -296,7 +296,7 @@
},
{
"github": "silverstripe/silverstripe-ckan-registry",
"composer": "silverstripe/ckan-registry",
"packagist": "silverstripe/ckan-registry",
"githubId": 159571764,
"isCore": false,
"lockstepped": false,
Expand Down Expand Up @@ -372,6 +372,7 @@
"lockstepped": false,
"type": "module",
"majorVersionMapping": {
"4": ["4"],
"5": ["5"],
"6": ["6"]
}
Expand Down Expand Up @@ -696,7 +697,7 @@
"githubId": 411910754,
"isCore": false,
"lockstepped": false,
"type": "module",
"type": "recipe",
"majorVersionMapping": {
"4": ["2"]
}
Expand Down Expand Up @@ -808,7 +809,7 @@
{
"github": "silverstripe/recipe-solr-search",
"packagist": "silverstripe/recipe-solr-search",
"githubId": 411910754,
"githubId": 411886231,
"isCore": false,
"lockstepped": true,
"type": "recipe",
Expand Down Expand Up @@ -1121,7 +1122,7 @@
}
},
{
"github": "silverstripe-themes/silverstripe-simple",
"github": "silverstripe/silverstripe-simple",
"packagist": "silverstripe-themes/simple",
"githubId": 3712566,
"isCore": true,
Expand Down Expand Up @@ -1431,8 +1432,7 @@
"githubId": 702760633,
"majorVersionMapping": {
"*": []
},
"private": true
}
},
{
"github": "silverstripe/github-issue-search-client",
Expand Down Expand Up @@ -1481,6 +1481,14 @@
"majorVersionMapping": {
"*": []
}
},
{
"github": "silverstripe/supported-modules",
"packagist": "silverstripe/supported-modules",
"githubId": 67956860,
"majorVersionMapping": {
"*": []
}
}
],
"misc": [
Expand Down Expand Up @@ -1565,4 +1573,4 @@
}
}
]
}
}
Loading

0 comments on commit 95cafa7

Please sign in to comment.