Skip to content

Commit 55ba30a

Browse files
Commit via running: make Sources/search
1 parent 2e40003 commit 55ba30a

File tree

2 files changed

+52
-15
lines changed

2 files changed

+52
-15
lines changed

Sources/search/Client.swift

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,22 @@ public struct Client: APIProtocol {
330330
}
331331
/// Search issues and pull requests
332332
///
333-
/// > [!WARNING]
334-
/// > **Notice:** Search for issues and pull requests will be overridden by advanced search on November 4, 2025.
335-
/// > You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/).
333+
/// Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).
334+
///
335+
/// When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted
336+
/// search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).
337+
///
338+
/// For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
339+
///
340+
/// `q=windows+label:bug+language:python+state:open&sort=created&order=asc`
341+
///
342+
/// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
343+
///
344+
/// > [!NOTE]
345+
/// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)."
336346
///
337347
/// - Remark: HTTP `GET /search/issues`.
338348
/// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`.
339-
@available(*, deprecated)
340349
public func searchIssuesAndPullRequests(_ input: Operations.SearchIssuesAndPullRequests.Input) async throws -> Operations.SearchIssuesAndPullRequests.Output {
341350
try await client.send(
342351
input: input,

Sources/search/Types.swift

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,22 @@ public protocol APIProtocol: Sendable {
5353
func searchCommits(_ input: Operations.SearchCommits.Input) async throws -> Operations.SearchCommits.Output
5454
/// Search issues and pull requests
5555
///
56-
/// > [!WARNING]
57-
/// > **Notice:** Search for issues and pull requests will be overridden by advanced search on November 4, 2025.
58-
/// > You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/).
56+
/// Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).
57+
///
58+
/// When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted
59+
/// search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).
60+
///
61+
/// For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
62+
///
63+
/// `q=windows+label:bug+language:python+state:open&sort=created&order=asc`
64+
///
65+
/// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
66+
///
67+
/// > [!NOTE]
68+
/// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)."
5969
///
6070
/// - Remark: HTTP `GET /search/issues`.
6171
/// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`.
62-
@available(*, deprecated)
6372
func searchIssuesAndPullRequests(_ input: Operations.SearchIssuesAndPullRequests.Input) async throws -> Operations.SearchIssuesAndPullRequests.Output
6473
/// Search labels
6574
///
@@ -185,13 +194,22 @@ extension APIProtocol {
185194
}
186195
/// Search issues and pull requests
187196
///
188-
/// > [!WARNING]
189-
/// > **Notice:** Search for issues and pull requests will be overridden by advanced search on November 4, 2025.
190-
/// > You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/).
197+
/// Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).
198+
///
199+
/// When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted
200+
/// search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).
201+
///
202+
/// For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
203+
///
204+
/// `q=windows+label:bug+language:python+state:open&sort=created&order=asc`
205+
///
206+
/// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
207+
///
208+
/// > [!NOTE]
209+
/// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)."
191210
///
192211
/// - Remark: HTTP `GET /search/issues`.
193212
/// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`.
194-
@available(*, deprecated)
195213
public func searchIssuesAndPullRequests(
196214
query: Operations.SearchIssuesAndPullRequests.Input.Query,
197215
headers: Operations.SearchIssuesAndPullRequests.Input.Headers = .init()
@@ -5974,9 +5992,19 @@ public enum Operations {
59745992
}
59755993
/// Search issues and pull requests
59765994
///
5977-
/// > [!WARNING]
5978-
/// > **Notice:** Search for issues and pull requests will be overridden by advanced search on November 4, 2025.
5979-
/// > You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/).
5995+
/// Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).
5996+
///
5997+
/// When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted
5998+
/// search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).
5999+
///
6000+
/// For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
6001+
///
6002+
/// `q=windows+label:bug+language:python+state:open&sort=created&order=asc`
6003+
///
6004+
/// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
6005+
///
6006+
/// > [!NOTE]
6007+
/// > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)."
59806008
///
59816009
/// - Remark: HTTP `GET /search/issues`.
59826010
/// - Remark: Generated from `#/paths//search/issues/get(search/issues-and-pull-requests)`.

0 commit comments

Comments
 (0)