Introducing the Community Repository on GitHub
TL;DR – We’re launching the Community repository on GitHub, a shared home for small, reusable features, with a governance model: features are proposed as GitHub Issues, approved, implemented (or migrated), built through pull requests, versioned in line with the CM MES version, and released through automated pipelines.
1. Introduction
In addition to the functionality present in the out-of-the-box and industry template solutions, there is a case for small, simple features that can be shared across projects, reducing duplication and enforcing consistency. A change made once benefits every project that depends on it, and that is the case for a community repository.
For this to work, a shared repository needs two things:
- Governance model – a standard way to propose, approve, build and release a feature.
- Technical setup – so that each feature can be built, tested and published independently.
Another major objective is to increase collaboration and knowledge sharing across teams, including not only internal project teams but also external partners. Therefore, the Community repository is hosted on GitHub, which facilitates open contributions and better visibility for all stakeholders.
This blog post focuses on the repository governance and technical guidelines for managing features in the repository.
2. Governance
For features to be included in the community repository, there are two entry paths:
- New features – not yet built in the scope of any project or template. The process starts by identifying it as a candidate feature and creating an Issue in the Community repository (see the table below).
- Existing features – already implemented in a project or template and judged generic enough to move to Community (a migration). An Issue must still be created for traceability, and the implementation must then be migrated into the Community repository with unit tests (to be written if the original had none).
A GitHub Issue is used in this context as a work item for tracking the proposed features, not to report problems or bugs. It serves as the central point for discussion, approval, and assignment of the feature.
Stages
The feature management lifecycle consists of the following stages.
| Step | Who | What happens | Output |
|---|---|---|---|
| 1. Identify | Project teams (Engineering + Functional Analysts), Portfolio Management | Candidate features are spotted in their own or other teams’ projects (planned or already implemented). | A new Issue in the Community repo. |
| 2. Approval | Maintainers/advocates (Engineering Leads and A&A) | Review proposals in a dedicated view; weigh scope and feasibility. | Feature approved or rejected. |
| 3. Implementation / Migration | Feature-assigned team | Code, unit tests, documentation, PR review. | CI (candidate) packages ready to install and demo. |
| 4. Internal demo (optional) | Feature-assigned team | Demo to interested parties, if deemed necessary by the feature owner. | Feature ready for official release. |
| 5. Release & publish | Feature-assigned engineering team | Official approval and publishing. | Feature usable by projects; added to the README catalog in the main branch. |
| 6. Global demo (optional) | Functional team (FAs / Product Managers) | Present the feature at a larger forum, if deemed necessary by the feature owner. | Knowledge transfer to the community. |
This is the proposed sequence, but several steps can be done in parallel, such as Identify and Approval (e.g. discuss the feasibility with a Senior/Principal SWE or an Engineering Lead). While some governance is required, flexibility is allowed to adapt to the specific needs and context of each feature.
In the Identify stage, a feature is proposed by creating a GitHub Issue in the repository:
- Go to the GitHub repository and click on Issues.
- Create a new Issue with the label
feature-request, with a thorough description of the feature. - Assign a feature owner (assignee).
- The Issue is now ready for official approval.
Some ground rules apply when merging code into the repository in the Implementation / Migration stage:
- Implementation, documentation and unit tests are mandatory.
- Pull Request approval by the feature owner or another designated reviewer.
- Every PR is linked to an Issue to ensure traceability.
- Integration tests: test the feature integrated in your own project before approving.
- One process for all changes: bugs, change requests and version updates follow the same validation.
- Features with Master Data packages must support both clean install and update. If an update is not possible via the MD package, create process rule(s).
3. Repository and Branch Structure
Folder layout
The repository is currently organized into the following folder structure:
mes-common-library/
├── features/
│ └── feature_x_root_folder/
│ ├── feature_x_subpackage_1/
│ ├── feature_x_subpackage_2/
│ ├── libs/
│ └── README.md
├── scaffolding/
├── samples/
├── utils/
├── LICENSE.txt
└── README.md
| Folder | Purpose |
|---|---|
features/ |
Self-contained MES/IoT features (source, config, dependencies, docs, tests), one per subfolder. Packages must follow the Cmf.Community.(…) naming convention. |
scaffolding/ |
Helper scripts to bootstrap or automate tasks consistently (e.g. create a new feature customization project). |
samples/ |
Importable master data (JSON, XLSX or ZIP) showcasing MES use cases. |
utils/ |
Reusable utilities, helper libraries and tools shared across features. |
README.md |
Repository documentation and feature catalog – every released feature is indexed here, on the main branch, optionally pointing to a feature-specific README. |
Branch policy
Since one feature can target multiple base CM MES versions, the branch policy ensures there is one development branch per MES version (11.1/dev, 11.2/dev, 11.3/dev, 12.0/dev). The feature branch is created from the corresponding dev branch and merged back into it once development is complete.
In summary, the branch policy is defined by the following table.
| Type | Pattern | Example | Notes |
|---|---|---|---|
| Dev | {MAJOR}.{MINOR}/dev |
11.3/dev |
Development branch for a MES version |
| Feature | {MAJOR}.{MINOR}/feature/{ID}-{Summary} |
11.3/feature/123-add-custom-validation |
Forks from and merges into its dev; deleted after merge |
| Bug | {MAJOR}.{MINOR}/bug/{ID}-{Summary} |
11.3/bug/456-fix-material-handling |
Same as feature |
| Main | main |
main |
Documentation and usage guidelines only |
4. Feature Versions and Tags
Package version
The package version must embed the MES version it targets, so the compatibility is visible at a glance:
{MES_MAJOR}{MES_MINOR}{MES_PATCH}{PKG_MAJOR}.{PKG_MINOR}.{PKG_PATCH}
Example: MES 11.3.0, package v1.0.0 => 11301.0.0
The repository contains scripts that guarantee the package version follows the pattern described above.
Feature version guidelines
- Major – breaking change.
- Minor – backwards-compatible change.
- Patch – bug fix.
When a feature is first released, or carried over to a new MES version, it starts at v1.0.0, unless a breaking change is shipped. Example:
| MES | Version history (example) |
|---|---|
| 11.1 | v1.0.0 Initial => v1.0.1 Bug fix |
| 11.2 | v1.0.0 Upgrade => v1.1.0 Minor => v2.0.0 Major => v2.0.1 Bug fix |
| 11.3 | v1.0.0 Upgrade => v2.0.0 Major |
Release tag format
The Git tags are applied automatically by the Release pipeline (described in the next section). Note that each tag is directly linked to a particular feature.
{FEATURE_NAME}/{MES_MAJOR}_{MES_MINOR}[_{MES_PATCH}]-v{PKG_MAJOR}_{PKG_MINOR}_{PKG_PATCH}
Example: FeatureA/11_1_0-v11101_0_0 = version 1.0.0 of FeatureA for MES 11.1.0.
In the tag, the package version uses the full package-version form (
11101_0_0), with underscores instead of dots.
5. Release Pipelines
Three pipelines take a change from a feature branch to a published release.
| Pipeline | Trigger | What it does |
|---|---|---|
| PR | PR opened or updated | Validates that changed packages build and unit tests pass. Does not pack or promote the packages. |
| CI | Manual, or push to dev branches |
Builds, packs and tests changed packages, then promotes them to the persistent CI package store. |
| Release | Manual, for one feature (or all) | Retrieves CI-tested packages, runs a final sanity check, and publishes artifacts in a tagged GitHub Release. |
flowchart LR
F["Feature / Bug branch<br/>(changed packages)"] -->|PR| D["dev branch<br/>(PR merge target)"]
D -->|CI| S["CI package store<br/>(tested & promoted)"]
S -->|Release| R["GitHub Release<br/>(tagged artifact)"]
Pipelines operate on the specific features changed, not on every feature in the repo, so one feature can ship without waiting for others.
Currently the packages are not published to a public registry like npmjs due to technical limitations. To use them in your projects, download the files after they are published on GitHub Releases. For projects hosted on Collaboration Hub, manually add the downloaded packages to RepoFlow.
6. Conclusion
The value of the Community repository is simple: build once, reuse everywhere. By complementing the out-of-the-box product and the industry template solutions, projects spend less time reinventing the same small but valuable features and more time on what is specific to the customer. By hosting the repository on GitHub, this work is shared across CM teams and with our partners.
Want to contribute?
If you need access to the repository to create Issues or implement features, contact Ricardo Cunha or any of the Engineering Leads or Architects & Advocacy members.
