-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ace51bb
commit 658033b
Showing
16 changed files
with
241 additions
and
96 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,39 @@ | ||
--- | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
merge_group: | ||
branches: ["**"] | ||
|
||
permissions: { } | ||
|
||
jobs: | ||
build: | ||
name: Protolint | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
# To report GitHub Actions status checks | ||
statuses: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
# super-linter needs the full git history to get the | ||
# list of files that changed across commits | ||
fetch-depth: 0 | ||
|
||
- name: Lint protocol buffers | ||
uses: super-linter/super-linter@v6 | ||
env: | ||
# To report GitHub Actions status checks | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
LINTER_RULES_PATH: . | ||
PROTOBUF_CONFIG_FILE: .protolint.yaml | ||
VALIDATE_PROTOBUF: true |
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,19 @@ | ||
--- | ||
lint: | ||
# Run `protolint list` to see all available rules. | ||
rules: | ||
all_default: true | ||
|
||
# The specific linters to remove. | ||
remove: | ||
- REPEATED_FIELD_NAMES_PLURALIZED | ||
- FIELD_NAMES_EXCLUDE_PREPOSITIONS | ||
- MESSAGE_NAMES_EXCLUDE_PREPOSITIONS | ||
- RPCS_HAVE_COMMENT | ||
- FIELDS_HAVE_COMMENT | ||
- ENUM_FIELDS_HAVE_COMMENT | ||
rules_option: | ||
# MAX_LINE_LENGTH rule option. | ||
max_line_length: | ||
max_chars: 120 | ||
tab_chars: 2 |
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,26 +1,39 @@ | ||
// Diagram service for rendering diagrams | ||
|
||
syntax = "proto3"; | ||
|
||
package workflows.v1; | ||
|
||
import "workflows/v1/core.proto"; | ||
|
||
// Request to render a diagram | ||
message RenderDiagramRequest { | ||
string diagram = 1; // The diagram graph in the D2 syntax | ||
RenderOptions render_options = 2; // The options for rendering the diagram | ||
} | ||
|
||
// Options for rendering the diagram | ||
message RenderOptions { | ||
string layout = 1; // The layout to use for rendering the diagram: https://d2lang.com/tour/layouts/. "dagre" or "elk". Defaults to "dagre" | ||
optional int64 theme_id = 2; // The theme to use for rendering the diagram: https://d2lang.com/tour/themes/ | ||
bool sketchy = 3; // Whether to render the diagram in a sketchy (hand-drawn) style | ||
int64 padding = 4; // The padding around the diagram | ||
string direction = 5; // Set explicitly the direction of the diagram: https://d2lang.com/tour/layouts/#direction. "up", "down", "right", "left". | ||
// The layout to use for rendering the diagram: https://d2lang.com/tour/layouts/. | ||
// "dagre" or "elk". Defaults to "dagre" | ||
string layout = 1; | ||
// The theme to use for rendering the diagram: https://d2lang.com/tour/themes/ | ||
optional int64 theme_id = 2; | ||
// Whether to render the diagram in a sketchy (hand-drawn) style | ||
bool sketchy = 3; | ||
// The padding around the diagram | ||
int64 padding = 4; | ||
// Set explicitly the direction of the diagram: https://d2lang.com/tour/layouts/#direction. | ||
// "up", "down", "right", "left". | ||
string direction = 5; | ||
} | ||
|
||
// A rendered diagram | ||
message Diagram { | ||
bytes svg = 1; | ||
} | ||
|
||
// The diagram service | ||
service DiagramService { | ||
rpc Render(RenderDiagramRequest) returns (Diagram); | ||
} |
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
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
Oops, something went wrong.