diff --git a/cli/Authentication/PersonalAccessToken.cs b/cli/Authentication/PersonalAccessToken.cs index 22433d9f1..6ec10637f 100644 --- a/cli/Authentication/PersonalAccessToken.cs +++ b/cli/Authentication/PersonalAccessToken.cs @@ -18,7 +18,7 @@ public static async Task Run() { // Personal Access Token authentication var tokenProvider = new TokenProvider(Environment.GetEnvironmentVariable("GITHUB_TOKEN") ?? ""); - var adapter = RequestAdapter.Create(new TokenAuthProvider(tokenProvider)); + var adapter = RequestAdapter.Create(new TokenAuthProvider(tokenProvider), "https://api.github.com"); var gitHubClient = new GitHubClient(adapter); try diff --git a/src/GitHub/Events/EventsRequestBuilder.cs b/src/GitHub/Events/EventsRequestBuilder.cs index a980ab8bb..a958ec9c4 100644 --- a/src/GitHub/Events/EventsRequestBuilder.cs +++ b/src/GitHub/Events/EventsRequestBuilder.cs @@ -31,7 +31,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas { } /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// API method documentation /// /// A List<Event> @@ -58,7 +58,7 @@ public async Task> GetAsync(Action - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -86,7 +86,7 @@ public EventsRequestBuilder WithUrl(string rawUrl) return new EventsRequestBuilder(rawUrl, RequestAdapter); } /// - /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// public class EventsRequestBuilderGetQueryParameters { diff --git a/src/GitHub/Models/PullRequestReview.cs b/src/GitHub/Models/PullRequestReview.cs index cd69b4e4d..a754b3d0e 100644 --- a/src/GitHub/Models/PullRequestReview.cs +++ b/src/GitHub/Models/PullRequestReview.cs @@ -55,7 +55,7 @@ public class PullRequestReview : IAdditionalDataHolder, IParsable public string HtmlUrl { get; set; } #endif /// Unique identifier of the review - public int? Id { get; set; } + public long? Id { get; set; } /// The _links property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -129,7 +129,7 @@ public virtual IDictionary> GetFieldDeserializers() {"body_text", n => { BodyText = n.GetStringValue(); } }, {"commit_id", n => { CommitId = n.GetStringValue(); } }, {"html_url", n => { HtmlUrl = n.GetStringValue(); } }, - {"id", n => { Id = n.GetIntValue(); } }, + {"id", n => { Id = n.GetLongValue(); } }, {"_links", n => { Links = n.GetObjectValue(PullRequestReview__links.CreateFromDiscriminatorValue); } }, {"node_id", n => { NodeId = n.GetStringValue(); } }, {"pull_request_url", n => { PullRequestUrl = n.GetStringValue(); } }, @@ -151,7 +151,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("body_text", BodyText); writer.WriteStringValue("commit_id", CommitId); writer.WriteStringValue("html_url", HtmlUrl); - writer.WriteIntValue("id", Id); + writer.WriteLongValue("id", Id); writer.WriteObjectValue("_links", Links); writer.WriteStringValue("node_id", NodeId); writer.WriteStringValue("pull_request_url", PullRequestUrl); diff --git a/src/GitHub/Networks/Item/Item/Events/EventsRequestBuilder.cs b/src/GitHub/Networks/Item/Item/Events/EventsRequestBuilder.cs index 15c68a8bf..0935a6adf 100644 --- a/src/GitHub/Networks/Item/Item/Events/EventsRequestBuilder.cs +++ b/src/GitHub/Networks/Item/Item/Events/EventsRequestBuilder.cs @@ -31,7 +31,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas { } /// - /// List public events for a network of repositories + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// API method documentation /// /// A List<Event> @@ -57,6 +57,9 @@ public async Task> GetAsync(Action(requestInfo, Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); return collectionResult?.ToList(); } + /// + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -83,7 +86,7 @@ public EventsRequestBuilder WithUrl(string rawUrl) return new EventsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List public events for a network of repositories + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// public class EventsRequestBuilderGetQueryParameters { diff --git a/src/GitHub/Orgs/Item/Events/EventsRequestBuilder.cs b/src/GitHub/Orgs/Item/Events/EventsRequestBuilder.cs index 51825842f..21d7e311f 100644 --- a/src/GitHub/Orgs/Item/Events/EventsRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Events/EventsRequestBuilder.cs @@ -31,7 +31,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas { } /// - /// List public organization events + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// API method documentation /// /// A List<Event> @@ -50,6 +50,9 @@ public async Task> GetAsync(Action(requestInfo, Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); return collectionResult?.ToList(); } + /// + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -76,7 +79,7 @@ public EventsRequestBuilder WithUrl(string rawUrl) return new EventsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List public organization events + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// public class EventsRequestBuilderGetQueryParameters { diff --git a/src/GitHub/Users/Item/Events/EventsRequestBuilder.cs b/src/GitHub/Users/Item/Events/EventsRequestBuilder.cs index 6902ccf95..f14047e3f 100644 --- a/src/GitHub/Users/Item/Events/EventsRequestBuilder.cs +++ b/src/GitHub/Users/Item/Events/EventsRequestBuilder.cs @@ -43,7 +43,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas { } /// - /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// API method documentation /// /// A List<Event> @@ -63,7 +63,7 @@ public async Task> GetAsync(Action - /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -91,7 +91,7 @@ public EventsRequestBuilder WithUrl(string rawUrl) return new EventsRequestBuilder(rawUrl, RequestAdapter); } /// - /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// public class EventsRequestBuilderGetQueryParameters { diff --git a/src/GitHub/Users/Item/Events/Orgs/Item/WithOrgItemRequestBuilder.cs b/src/GitHub/Users/Item/Events/Orgs/Item/WithOrgItemRequestBuilder.cs index fc508437e..9161c7734 100644 --- a/src/GitHub/Users/Item/Events/Orgs/Item/WithOrgItemRequestBuilder.cs +++ b/src/GitHub/Users/Item/Events/Orgs/Item/WithOrgItemRequestBuilder.cs @@ -31,7 +31,7 @@ public WithOrgItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// - /// This is the user's organization dashboard. You must be authenticated as the user to view this. + /// This is the user's organization dashboard. You must be authenticated as the user to view this.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// API method documentation /// /// A List<Event> @@ -51,7 +51,7 @@ public async Task> GetAsync(Action - /// This is the user's organization dashboard. You must be authenticated as the user to view this. + /// This is the user's organization dashboard. You must be authenticated as the user to view this.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -79,7 +79,7 @@ public WithOrgItemRequestBuilder WithUrl(string rawUrl) return new WithOrgItemRequestBuilder(rawUrl, RequestAdapter); } /// - /// This is the user's organization dashboard. You must be authenticated as the user to view this. + /// This is the user's organization dashboard. You must be authenticated as the user to view this.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// public class WithOrgItemRequestBuilderGetQueryParameters { diff --git a/src/GitHub/Users/Item/Events/Public/PublicRequestBuilder.cs b/src/GitHub/Users/Item/Events/Public/PublicRequestBuilder.cs index 9b0867e7e..2259acfbd 100644 --- a/src/GitHub/Users/Item/Events/Public/PublicRequestBuilder.cs +++ b/src/GitHub/Users/Item/Events/Public/PublicRequestBuilder.cs @@ -31,7 +31,7 @@ public PublicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas { } /// - /// List public events for a user + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// API method documentation /// /// A List<Event> @@ -50,6 +50,9 @@ public async Task> GetAsync(Action(requestInfo, Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); return collectionResult?.ToList(); } + /// + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -76,7 +79,7 @@ public PublicRequestBuilder WithUrl(string rawUrl) return new PublicRequestBuilder(rawUrl, RequestAdapter); } /// - /// List public events for a user + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// public class PublicRequestBuilderGetQueryParameters { diff --git a/src/GitHub/Users/Item/Received_events/Public/PublicRequestBuilder.cs b/src/GitHub/Users/Item/Received_events/Public/PublicRequestBuilder.cs index f008e102e..8840e65ab 100644 --- a/src/GitHub/Users/Item/Received_events/Public/PublicRequestBuilder.cs +++ b/src/GitHub/Users/Item/Received_events/Public/PublicRequestBuilder.cs @@ -31,7 +31,7 @@ public PublicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas { } /// - /// List public events received by a user + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// API method documentation /// /// A List<Event> @@ -50,6 +50,9 @@ public async Task> GetAsync(Action(requestInfo, Event.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); return collectionResult?.ToList(); } + /// + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. + /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -76,7 +79,7 @@ public PublicRequestBuilder WithUrl(string rawUrl) return new PublicRequestBuilder(rawUrl, RequestAdapter); } /// - /// List public events received by a user + /// > [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// public class PublicRequestBuilderGetQueryParameters { diff --git a/src/GitHub/Users/Item/Received_events/Received_eventsRequestBuilder.cs b/src/GitHub/Users/Item/Received_events/Received_eventsRequestBuilder.cs index b6f868f2a..0a7577435 100644 --- a/src/GitHub/Users/Item/Received_events/Received_eventsRequestBuilder.cs +++ b/src/GitHub/Users/Item/Received_events/Received_eventsRequestBuilder.cs @@ -37,7 +37,7 @@ public Received_eventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt { } /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as thegiven user, you will see private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// API method documentation /// /// A List<Event> @@ -57,7 +57,7 @@ public async Task> GetAsync(Action - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as thegiven user, you will see private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -85,7 +85,7 @@ public Received_eventsRequestBuilder WithUrl(string rawUrl) return new Received_eventsRequestBuilder(rawUrl, RequestAdapter); } /// - /// These are events that you've received by watching repositories and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + /// These are events that you've received by watching repositories and following users. If you are authenticated as thegiven user, you will see private events. Otherwise, you'll only see public events.> [!NOTE]> This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. /// public class Received_eventsRequestBuilderGetQueryParameters { diff --git a/src/GitHub/kiota-lock.json b/src/GitHub/kiota-lock.json index ae6b6afa4..4a4e09fba 100644 --- a/src/GitHub/kiota-lock.json +++ b/src/GitHub/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "145BCDC18ADD0C8E2EC561562308D43480017AD06C35365B09A27C83A9E6AAA51A6AF94048AF9F372388146007325C1DB4ED2E86F5CBFCEAD3625FBFBE1F9D51", + "descriptionHash": "69B161AEBDE87E127DB15C26F687951F2C4EC154754CC81FAEE2C1258265EA737FE15B6459B3F721B15D2F078A075486011134B82AE8CDB0828C485EE1CE03E8", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.14.0", diff --git a/test/Tests.csproj b/test/Tests.csproj index d8b0201ce..79a24270e 100644 --- a/test/Tests.csproj +++ b/test/Tests.csproj @@ -29,17 +29,17 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + +