-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release v2.5
- Loading branch information
Showing
66 changed files
with
43,947 additions
and
4,488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI Labels | ||
|
||
# Controls when the workflow will run | ||
on: | ||
pull_request: | ||
types: | ||
# default types (i.e. default for on: pull_request) | ||
- opened | ||
- synchronize | ||
- reopened | ||
# trigger on change of labels | ||
- labeled | ||
- unlabeled | ||
branches: | ||
- develop-v3 | ||
- develop-v2 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check PR Labels | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
const VALID_LABELS_MESSAGE = 'Success! PR has valid labels.' | ||
const BREAKING_LABELS = ['Breaking Change', 'Non-breaking Change'] | ||
const labelNames = context.payload.pull_request.labels.map(label => label.name) | ||
console.log(`INFO: Found PR labels: ${labelNames}`) | ||
const assertExactlyOneOf = (choices) => { | ||
const foundLabels = [] | ||
for (let choice of choices) { | ||
if (labelNames.includes(choice)) { | ||
foundLabels.push(choice) | ||
} | ||
} | ||
if (foundLabels.length === 1) { | ||
return true | ||
} | ||
else if (foundLabels.length === 0) { | ||
throw `PR is missing one of the labels: ${choices}` | ||
} | ||
else { | ||
throw `Expected PR to include exactly one label from ${choices}; Found ${foundLabels}` | ||
} | ||
} | ||
if (labelNames.length === 1 && labelNames[0] === 'ignore') { | ||
console.log(VALID_LABELS_MESSAGE) | ||
return | ||
} | ||
if (labelNames.length === 1 && labelNames[0] === 'No Schema Changes') { | ||
console.log(VALID_LABELS_MESSAGE) | ||
return | ||
} | ||
assertExactlyOneOf(BREAKING_LABELS) | ||
if (!labelNames.some(label => label.startsWith('Schema:'))) { | ||
throw `PR is missing a scoping label, i.e., a label starting with "Schema: ..." or "Schema: No Changes"` | ||
} | ||
console.log(VALID_LABELS_MESSAGE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,5 @@ geojson.xsd | |
.venv | ||
*.egg-info | ||
.ipynb_checkpoints | ||
*.bak | ||
*.ipynb |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,14 @@ | ||
# Developer Resources | ||
|
||
## Git Naming Conventions | ||
|
||
Commit messages should follow the format of | ||
|
||
|
||
```bash | ||
<type>[( optional scope )]: <description> | ||
|
||
[optional body] | ||
``` | ||
|
||
`type` must be one of the following: | ||
|
||
- **docs**: Changes to the documentation (e.g. improving the annotation of an element, updating this file, etc) | ||
- **feat**: Adds a new feature (e.g. adding a new element to the schema) | ||
- **fix**: A bug fix (e.g. adding a missing closing tag, or moving a misplaced element) | ||
- **proposal**: Adding or editing a proposal (e.g. creating a proposal for a new modeling concept for the schema) | ||
- **refactor**: Changes that don't fix a bug or add a new feature (e.g. turning an element into a complexType for reuse) | ||
- **style**: Changes that don't affect the meaning of code (e.g. whitespace) | ||
- **test**: Adding or correcting tests | ||
|
||
`scope` is optional for commit messages, and should indicate the general area of the application affected. | ||
|
||
`description` is a short description of the changes in imperative present tense (such as “add function to _”, not “added function”) | ||
|
||
Branches should be named as `[optional issue number -]<type>/<scope>`, where `scope` is the general scope affected, or if creating a feature branch, a shortened name of the feature being added. If `scope` is more than one word, it should be separated by dashes. | ||
|
||
Pull Request titles should follow the format `[# optional issue number] <type>[( optional scope )]: <description>`, following the same conventions as commit messages. | ||
|
||
Commit examples: | ||
|
||
- `feat(schema): add MyElement to ParentElement` | ||
- `proposal: add proposal for MyElement` | ||
- `refactor: make SimpleElement restriction a regex test` | ||
|
||
Branch examples: | ||
|
||
- `1234-feat/typical-operating-hours` | ||
- `refactor/terminal-unit-type` | ||
|
||
Pull request examples: | ||
|
||
- `#1234 feat(schema): add MyElement to ParentElement` | ||
- `proposal: add proposal for MyElement` | ||
|
||
## Deprecation Policy | ||
|
||
Details of the deprecation policy are included in the BuildingSync XML schema file. | ||
|
||
## Pull Requests | ||
### Summary | ||
BuildingSync uses Pull Requests (PRs) to track and report changes to users when creating releases. Specifically, we document changes to the schema/repo by using labels on PRs, thus we require developers to add labels to all PRs. Our CI will validate labels. | ||
|
||
### Requirements | ||
- PRs are our "source of truth" for important changes to the repo/schema | ||
- We encourage separate PRs for each "logical"/"discrete" change to the schema (especially if the changes are impactful/non-trivial to users). For example, removing an element from the schema should be separate from adding a choice to an unrelated element. | ||
- The labels for the PR indicate the implications of the changes. Our CI system will validate your labels. See [CI Labels](../.github/workflows/CI_Labels.yml) for more info. |
Oops, something went wrong.