Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 804552b

Browse files
authored
Update Issues GraphQL query and related codes
- Added new fields (specified in #169) to the GraphQL query. - Restored previously commented-out project-related fields. - Explicitly mapped GraphQL custom scalar `URI` to Rust. - Updated `GitHubIssue` struct to align with the `Issue` struct, and adjusted related functions accordingly. - Made alias for enums related with `GitHubIssue` struct. - Changed the numeric type in `parse_key`'s return value from `i64` to `i32` to align with the GraphQL API. Close: #169
1 parent 4b2509f commit 804552b

File tree

7 files changed

+588
-70
lines changed

7 files changed

+588
-70
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1515
`assignee`, `author`, `repo`(repository name), `begin` and `end` (creation
1616
date range). The query returns the `openIssueCount` field, indicating the
1717
number of open issues.
18+
- Added additional fields to the `issues` GraphQL query, providing detailed information
19+
such as comments, labels, related sub-issues, linked pull requests, issue descriptions,
20+
timestamps, and project-related metadata.
1821

1922
### Changed
2023

src/database.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl<T: TryFromKeyValue> DoubleEndedIterator for Iter<T> {
151151
}
152152
}
153153

154-
pub(crate) fn parse_key(key: &[u8]) -> Result<(String, String, i64)> {
154+
pub(crate) fn parse_key(key: &[u8]) -> Result<(String, String, i32)> {
155155
let re = Regex::new(r"(?P<owner>\S+)/(?P<name>\S+)#(?P<number>[0-9]+)").expect("valid regex");
156156
if let Some(caps) = re.captures(
157157
String::from_utf8(key.to_vec())
@@ -172,7 +172,7 @@ pub(crate) fn parse_key(key: &[u8]) -> Result<(String, String, i64)> {
172172
.name("number")
173173
.ok_or_else(|| anyhow!("invalid key"))?
174174
.as_str()
175-
.parse::<i64>()
175+
.parse::<i32>()
176176
.context("invalid key")?;
177177
Ok((owner, name, number))
178178
} else {

0 commit comments

Comments
 (0)