github-issue-list 0.0.1__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-issue-list
3
- Version: 0.0.1
3
+ Version: 0.0.3
4
4
  Summary: List open GitHub issues assigned to a user in an organization.
5
5
  Author: Kaizten Analytics
6
6
  License-Expression: LicenseRef-Proprietary
@@ -57,7 +57,7 @@ options:
57
57
  --username USERNAME GitHub assignee. Defaults to the authenticated gh user.
58
58
  ```
59
59
 
60
- The table contains the full repository name, issue number, truncated title, UTC creation time, and elapsed time since creation. The search returns at most 1,000 issues, matching GitHub's issue-search result limit.
60
+ The table contains a one-based row number, full repository name, issue number, truncated title, issue URL, UTC creation time, and elapsed time since creation. The search returns at most 1,000 issues, matching GitHub's issue-search result limit.
61
61
 
62
62
  ## Development
63
63
 
@@ -46,7 +46,7 @@ options:
46
46
  --username USERNAME GitHub assignee. Defaults to the authenticated gh user.
47
47
  ```
48
48
 
49
- The table contains the full repository name, issue number, truncated title, UTC creation time, and elapsed time since creation. The search returns at most 1,000 issues, matching GitHub's issue-search result limit.
49
+ The table contains a one-based row number, full repository name, issue number, truncated title, issue URL, UTC creation time, and elapsed time since creation. The search returns at most 1,000 issues, matching GitHub's issue-search result limit.
50
50
 
51
51
  ## Development
52
52
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "github-issue-list"
7
- version = "0.0.1"
7
+ version = "0.0.3"
8
8
  description = "List open GitHub issues assigned to a user in an organization."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-issue-list
3
- Version: 0.0.1
3
+ Version: 0.0.3
4
4
  Summary: List open GitHub issues assigned to a user in an organization.
5
5
  Author: Kaizten Analytics
6
6
  License-Expression: LicenseRef-Proprietary
@@ -57,7 +57,7 @@ options:
57
57
  --username USERNAME GitHub assignee. Defaults to the authenticated gh user.
58
58
  ```
59
59
 
60
- The table contains the full repository name, issue number, truncated title, UTC creation time, and elapsed time since creation. The search returns at most 1,000 issues, matching GitHub's issue-search result limit.
60
+ The table contains a one-based row number, full repository name, issue number, truncated title, issue URL, UTC creation time, and elapsed time since creation. The search returns at most 1,000 issues, matching GitHub's issue-search result limit.
61
61
 
62
62
  ## Development
63
63
 
@@ -176,6 +176,10 @@ def truncate_title(title: str, limit: int = TITLE_LIMIT) -> str:
176
176
  return clean[: limit - 3] + "..."
177
177
 
178
178
 
179
+ def issue_url(issue: Issue) -> str:
180
+ return f"https://github.com/{issue.repository}/issues/{issue.number}"
181
+
182
+
179
183
  def table(headers: list[str], rows: list[list[str]]) -> str:
180
184
  widths = [len(header) for header in headers]
181
185
  for row in rows:
@@ -197,16 +201,18 @@ def render_issue_table(issues: list[Issue], now: datetime) -> str:
197
201
  return "(none found)"
198
202
  rows = [
199
203
  [
204
+ str(index),
200
205
  issue.repository,
201
206
  f"#{issue.number}",
202
207
  truncate_title(issue.title),
208
+ issue_url(issue),
203
209
  format_github_datetime(issue.created_at),
204
210
  elapsed_time(issue.created_at, now),
205
211
  ]
206
- for issue in issues
212
+ for index, issue in enumerate(issues, start=1)
207
213
  ]
208
214
  return table(
209
- ["Repository", "Issue number", "Issue title", "Creation time", "Time since creation"],
215
+ ["Index", "Repository", "Issue", "Title", "URL", "Creation time", "Since creation"],
210
216
  rows,
211
217
  )
212
218
 
@@ -140,15 +140,33 @@ class GithubIssueListTests(unittest.TestCase):
140
140
  now,
141
141
  )
142
142
 
143
+ self.assertIn("Number", rendered)
143
144
  self.assertIn("Repository", rendered)
144
145
  self.assertIn("Issue number", rendered)
145
146
  self.assertIn("Issue title", rendered)
147
+ self.assertIn("Issue URL", rendered)
146
148
  self.assertIn("Creation time", rendered)
147
149
  self.assertIn("Time since creation", rendered)
148
150
  self.assertIn("octo/repo", rendered)
149
151
  self.assertIn("#7", rendered)
152
+ self.assertIn("https://github.com/octo/repo/issues/7", rendered)
150
153
  self.assertIn("2026-10-12T10:30:00Z", rendered)
151
154
  self.assertIn("2d 1h 30m", rendered)
155
+ headers = [cell.strip() for cell in rendered.splitlines()[0].strip("|").split("|")]
156
+ self.assertEqual(
157
+ headers,
158
+ [
159
+ "Number",
160
+ "Repository",
161
+ "Issue number",
162
+ "Issue title",
163
+ "Issue URL",
164
+ "Creation time",
165
+ "Time since creation",
166
+ ],
167
+ )
168
+ values = [cell.strip() for cell in rendered.splitlines()[2].strip("|").split("|")]
169
+ self.assertEqual(values[0], "1")
152
170
  self.assertEqual(issue_list.render_issue_table([], now), "(none found)")
153
171
 
154
172
  def test_run_resolves_defaults_and_prints_table(self):