-
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.
Change the MentionId type and also create a directory to store GitHub…
… REST files.
- Loading branch information
1 parent
52a03fd
commit 2c85b29
Showing
8 changed files
with
173 additions
and
66 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
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
41 changes: 41 additions & 0 deletions
41
github/src/main/proto/spine_examples/pingh/github/identifiers.proto
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,41 @@ | ||
/* | ||
* Copyright 2024, TeamDev. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Redistribution and use in source and/or binary forms, with or without | ||
* modification, must retain the above copyright notice and the following | ||
* disclaimer. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
syntax = "proto3"; | ||
|
||
package spine_examples.pingh.github; | ||
|
||
import "spine/options.proto"; | ||
|
||
option (type_url_prefix) = "type.pingh.spine.io"; | ||
option java_package = "io.spine.examples.pingh.github"; | ||
option java_outer_classname = "IdentifiersProto"; | ||
option java_multiple_files = true; | ||
|
||
// The global identifier for any item in the GitHub. | ||
message NodeId { | ||
|
||
string value = 1 [(required) = true]; | ||
} |
91 changes: 91 additions & 0 deletions
91
github/src/main/proto/spine_examples/pingh/github/rest/rest.proto
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,91 @@ | ||
/* | ||
* Copyright 2024, TeamDev. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Redistribution and use in source and/or binary forms, with or without | ||
* modification, must retain the above copyright notice and the following | ||
* disclaimer. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
syntax = "proto3"; | ||
|
||
package spine_examples.pingh.github.rest; | ||
|
||
import "spine/options.proto"; | ||
|
||
option (type_url_prefix) = "type.pingh.spine.io"; | ||
option java_package = "io.spine.examples.pingh.github.rest"; | ||
option java_outer_classname = "GitHubRestProto"; | ||
option java_multiple_files = true; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
import "spine/net/url.proto"; | ||
|
||
// GitHub user information. | ||
// | ||
// The data is stored in primitive types. It is used to retrieve user data | ||
// from JSON responses from the GitHub API. | ||
// | ||
message UserFragment { | ||
|
||
// The unique username that identifies the user. | ||
string username = 1 [(required) = true, json_name = "login"]; | ||
|
||
// The URL to the user's avatar. | ||
string avatar_url = 2 [(required) = true, json_name = "avatar_url"]; | ||
} | ||
|
||
// Contains data about the issue or pull request received from the GitHub API. | ||
// | ||
// In the GitHub context, issues and pull requests have the same data structure. | ||
// | ||
// It is used to retrieve item data from JSON responses from the GitHub API. | ||
// | ||
message IssueOrPullRequestFragment { | ||
|
||
// The item's ID in GitHub. | ||
string node_id = 1 [(required) = true, json_name = "node_id"]; | ||
|
||
// The item's author. | ||
UserFragment who_created = 2 [(required) = true, json_name = "user"]; | ||
|
||
// The item's title. | ||
string title = 3 [(required) = true]; | ||
|
||
// Time when this item was created. | ||
string when_created = 4 [(required) = true, json_name = "created_at"]; | ||
|
||
// The URL to this GitHub item. | ||
string html_url = 5 [(required) = true, json_name = "html_url"]; | ||
} | ||
|
||
// The GitHub API response received when requesting to search for mentions | ||
// in issues and pull requests. | ||
// | ||
// In the GitHub context, issues and pull requests have the same data structure. | ||
// Request to the GitHub API to retrieve them is the same and returns a list containing | ||
// both issues and pull requests. | ||
// | ||
// It is used to retrieve data from JSON responses from the GitHub API. | ||
// | ||
message IssuesAndPullRequestsSearchResult { | ||
|
||
// GitHub items on which the mention occurred. | ||
repeated IssueOrPullRequestFragment item = 1 [(required) = true, json_name = "items"]; | ||
} |
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