You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. Back-merge to main (automatic, highest version only)
43
+
└─ [release.yml] creates PR: release/X.Y → main (only when X.Y is the highest release branch)
44
+
│
45
+
│ PR merged → main is updated to the latest stable source
37
46
```
38
47
39
48
## Rules Per Branch Type
40
49
41
50
### `main`
42
51
43
-
- Represents the current stable release.
52
+
- Represents the latest stable release — always in sync with the highest released version.
44
53
- Direct pushes are not allowed (protected).
45
-
- Updated by merging from `release/X.Y` after a stable release.
54
+
- Updated automatically via a PR created by `release.yml` whenever the highest `release/X.Y` branch publishes a stable release.
55
+
- Serves as the baseline for version bumps: new development versions are derived from the state of `main` at the point the previous release left off.
46
56
- The `build.yml` workflow does **not** trigger on `main` pushes (branch-ignore pattern excludes `preview/**` and `release/**`, and `main` does not match `src/**` changes by default in the context of the ignore rules — check the workflow for current specifics).
- Auto-created when the first stable release from `release/X.Y` is published.
69
+
- Protected: all changes are merged via pull request from `bugfix/**` branches.
58
70
- Can be promoted to `preview/X.Y` for a patch release.
59
71
72
+
### `feature/<id>-<description>`
73
+
74
+
- Short-lived branch for individual feature work (e.g. `feature/123-async-decoder`).
75
+
- Merged into the appropriate `develop/X.Y` via pull request.
76
+
- Not protected — deleted after merging.
77
+
78
+
### `bugfix/<id>-<description>`
79
+
80
+
- Short-lived branch for bug fixes (e.g. `bugfix/124-decode-overflow`).
81
+
- Merged into the appropriate `support/X.Y` via pull request.
82
+
- Not protected — deleted after merging.
83
+
60
84
### `preview/X.Y`
61
85
62
86
- Created automatically by `promote-branch.yml`.
@@ -70,6 +94,8 @@ This document describes the branch model, the purpose of each branch type, and h
70
94
- Created automatically by `promote-branch.yml` from `preview/X.Y`.
71
95
- Locked immediately: requires at least one PR approval.
72
96
- On merge, `release.yml` publishes a **stable** NuGet package and a GitHub release.
97
+
- After the first stable release, a corresponding `support/X.Y` branch is auto-created.
98
+
- When `X.Y` is the highest release branch, `release.yml` automatically opens a PR to merge back into `main`, keeping `main` in sync with the latest stable state.
73
99
74
100
## Version in Branch Names
75
101
@@ -84,4 +110,4 @@ The `X.Y` in `preview/X.Y` and `release/X.Y` drives the version pipeline. See [V
84
110
85
111
## Locking and Unlocking Branches
86
112
87
-
`preview/**` and `release/**` branches are locked via the [`github/branch-protection/lock`](./composite-actions.md#githubbranch-protectionlock) composite action when created. The [`github/branch-protection/unlock`](./composite-actions.md#githubbranch-protectionunlock) action temporarily removes protection when a workflow needs to push directly (e.g., `bump-version.yml`). Branches are always re-locked immediately after.
113
+
`preview/**` and `release/**` branches are locked via the [`github/branch-protection/lock`](./composite-actions.md#githubbranch-protectionlock) composite action when created. `develop/X.Y` and `support/X.Y` branches must be manually configured as protected in repository settings (PR required, no direct pushes). The [`github/branch-protection/unlock`](./composite-actions.md#githubbranch-protectionunlock) action temporarily removes protection when a workflow needs to push directly (e.g., `bump-version.yml`). Branches are always re-locked immediately after.
Copy file name to clipboardExpand all lines: docs/extensibility.md
+1-19Lines changed: 1 addition & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Extensibility
2
2
3
-
This guide explains how to add new coordinate types, polyline representations, and encoding schemes to PolylineAlgorithm.
3
+
This guide explains how to use PolylineAlgorithm with your own coordinate types and polyline representations.
4
4
5
5
## Design Overview
6
6
@@ -105,14 +105,6 @@ public sealed class TuplePolylineDecoder : AbstractPolylineDecoder<string, (doub
105
105
}
106
106
```
107
107
108
-
## Supporting a Different Polyline Format
109
-
110
-
The encoding algorithm itself (Google's encoded polyline algorithm) is implemented in `AbstractPolylineEncoder` and `AbstractPolylineDecoder`. If you need a completely different algorithm:
111
-
112
-
1. Create a new class in its own file — do **not** modify the existing abstract base classes.
3. If the new algorithm shares coordinate-type logic with an existing encoder/decoder, consider extracting that logic into a shared helper in the `PolylineAlgorithm.Utility` project.
115
-
116
108
## Encoding Options
117
109
118
110
`PolylineEncodingOptions` controls shared behavior. Configure it via `PolylineEncodingOptionsBuilder`:
@@ -134,13 +126,3 @@ var decoder = new TuplePolylineDecoder(options);
134
126
## Extension Methods
135
127
136
128
The library provides extension methods for `IPolylineEncoder` and `IPolylineDecoder` to support common collection types (`IEnumerable<T>`, arrays, `ReadOnlyMemory<T>`). These are in `PolylineAlgorithm.Extensions`. Your custom implementations automatically benefit from these extension methods as long as you implement the interfaces.
137
-
138
-
## Checklist for a New Encoding Scheme
139
-
140
-
-[ ] Create the encoder class in a new file (one class per file).
141
-
-[ ] Create the decoder class in a new file.
142
-
-[ ] Add XML doc comments to all public members.
143
-
-[ ] Add unit tests in `tests/PolylineAlgorithm.Tests/` following the [testing conventions](./testing.md).
144
-
-[ ] Add benchmarks in `benchmarks/PolylineAlgorithm.Benchmarks/` following the [benchmarking guide](./benchmarks.md).
145
-
-[ ] Update `PublicAPI.Unshipped.txt` with any new public API surface.
146
-
-[ ] Add usage samples in `samples/` if the new type is intended for end users.
0 commit comments