github-issue-list 0.0.2__tar.gz → 0.0.4__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.2
3
+ Version: 0.0.4
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, 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.
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, 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.
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.2"
7
+ version = "0.0.4"
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.2
3
+ Version: 0.0.4
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, 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.
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
 
@@ -201,6 +201,7 @@ def render_issue_table(issues: list[Issue], now: datetime) -> str:
201
201
  return "(none found)"
202
202
  rows = [
203
203
  [
204
+ str(index),
204
205
  issue.repository,
205
206
  f"#{issue.number}",
206
207
  truncate_title(issue.title),
@@ -208,10 +209,10 @@ def render_issue_table(issues: list[Issue], now: datetime) -> str:
208
209
  format_github_datetime(issue.created_at),
209
210
  elapsed_time(issue.created_at, now),
210
211
  ]
211
- for issue in issues
212
+ for index, issue in enumerate(issues, start=1)
212
213
  ]
213
214
  return table(
214
- ["Repository", "Issue number", "Issue title", "Issue URL", "Creation time", "Time since creation"],
215
+ ["Index", "Repository", "Issue", "Title", "URL", "Creation time", "Since creation"],
215
216
  rows,
216
217
  )
217
218
 
@@ -140,6 +140,7 @@ 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)
@@ -154,8 +155,18 @@ class GithubIssueListTests(unittest.TestCase):
154
155
  headers = [cell.strip() for cell in rendered.splitlines()[0].strip("|").split("|")]
155
156
  self.assertEqual(
156
157
  headers,
157
- ["Repository", "Issue number", "Issue title", "Issue URL", "Creation time", "Time since creation"],
158
+ [
159
+ "Number",
160
+ "Repository",
161
+ "Issue number",
162
+ "Issue title",
163
+ "Issue URL",
164
+ "Creation time",
165
+ "Time since creation",
166
+ ],
158
167
  )
168
+ values = [cell.strip() for cell in rendered.splitlines()[2].strip("|").split("|")]
169
+ self.assertEqual(values[0], "1")
159
170
  self.assertEqual(issue_list.render_issue_table([], now), "(none found)")
160
171
 
161
172
  def test_run_resolves_defaults_and_prints_table(self):