Skip to content

Commit 3a29d67

Browse files
Copilotzkoppert
andcommitted
docs: add HIDE_ASSIGNEE configuration to README.md
Co-authored-by: zkoppert <[email protected]>
1 parent d84ddfb commit 3a29d67

File tree

2 files changed

+32
-23
lines changed

2 files changed

+32
-23
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ This action can be configured to authenticate with GitHub App Installation or Pe
147147
| ----------------------------- | -------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
148148
| `GH_ENTERPRISE_URL` | False | `""` | URL of GitHub Enterprise instance to use for auth instead of github.com |
149149
| `RATE_LIMIT_BYPASS` | False | `false` | If set to `true`, the rate limit will be bypassed. This is useful if being run on an local GitHub server with rate limiting disabled. |
150+
| `HIDE_ASSIGNEE` | False | False | If set to `true`, the assignee will not be displayed in the generated Markdown file. |
150151
| `HIDE_AUTHOR` | False | False | If set to `true`, the author will not be displayed in the generated Markdown file. |
151152
| `HIDE_ITEMS_CLOSED_COUNT` | False | False | If set to `true`, the number of items closed metric will not be displayed in the generated Markdown file. |
152153
| `HIDE_LABEL_METRICS` | False | False | If set to `true`, the time in label metrics will not be displayed in the generated Markdown file. |

test_assignee_functionality.py

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -97,23 +97,24 @@ def test_assignee_column_position(self):
9797

9898
def test_multiple_assignees_rendering_logic(self):
9999
"""Test that multiple assignees are rendered correctly in assignee column."""
100-
from classes import IssueWithMetrics
101100
from io import StringIO
102-
101+
102+
from classes import IssueWithMetrics
103+
103104
# Test the assignee rendering logic directly
104105
endpoint = "github.com"
105106
columns = ["Title", "URL", "Assignee", "Author"]
106-
107+
107108
# Test case 1: Multiple assignees
108109
issue_multiple = IssueWithMetrics(
109110
title="Test Issue with Multiple Assignees",
110111
html_url="https://github.com/test/repo/issues/1",
111112
author="testuser",
112113
assignee="alice",
113-
assignees=["alice", "bob", "charlie"]
114+
assignees=["alice", "bob", "charlie"],
114115
)
115-
116-
# Simulate the new rendering logic
116+
117+
# Simulate the new rendering logic
117118
if "Assignee" in columns:
118119
if issue_multiple.assignees:
119120
assignee_links = [
@@ -123,20 +124,23 @@ def test_multiple_assignees_rendering_logic(self):
123124
multiple_output = f" {', '.join(assignee_links)} |"
124125
else:
125126
multiple_output = " None |"
126-
127+
127128
expected_multiple = " [alice](https://github.com/alice), [bob](https://github.com/bob), [charlie](https://github.com/charlie) |"
128-
self.assertEqual(multiple_output, expected_multiple,
129-
"Multiple assignees should be rendered as comma-separated links")
130-
129+
self.assertEqual(
130+
multiple_output,
131+
expected_multiple,
132+
"Multiple assignees should be rendered as comma-separated links",
133+
)
134+
131135
# Test case 2: Single assignee
132136
issue_single = IssueWithMetrics(
133137
title="Test Issue with Single Assignee",
134138
html_url="https://github.com/test/repo/issues/2",
135139
author="testuser",
136140
assignee="alice",
137-
assignees=["alice"]
141+
assignees=["alice"],
138142
)
139-
143+
140144
if "Assignee" in columns:
141145
if issue_single.assignees:
142146
assignee_links = [
@@ -146,20 +150,23 @@ def test_multiple_assignees_rendering_logic(self):
146150
single_output = f" {', '.join(assignee_links)} |"
147151
else:
148152
single_output = " None |"
149-
153+
150154
expected_single = " [alice](https://github.com/alice) |"
151-
self.assertEqual(single_output, expected_single,
152-
"Single assignee should be rendered as a single link")
153-
155+
self.assertEqual(
156+
single_output,
157+
expected_single,
158+
"Single assignee should be rendered as a single link",
159+
)
160+
154161
# Test case 3: No assignees
155162
issue_none = IssueWithMetrics(
156163
title="Test Issue with No Assignees",
157164
html_url="https://github.com/test/repo/issues/3",
158-
author="testuser",
165+
author="testuser",
159166
assignee=None,
160-
assignees=[]
167+
assignees=[],
161168
)
162-
169+
163170
if "Assignee" in columns:
164171
if issue_none.assignees:
165172
assignee_links = [
@@ -169,11 +176,12 @@ def test_multiple_assignees_rendering_logic(self):
169176
none_output = f" {', '.join(assignee_links)} |"
170177
else:
171178
none_output = " None |"
172-
179+
173180
expected_none = " None |"
174-
self.assertEqual(none_output, expected_none,
175-
"No assignees should be rendered as 'None'")
176-
181+
self.assertEqual(
182+
none_output, expected_none, "No assignees should be rendered as 'None'"
183+
)
184+
177185
print(f"✅ Multiple assignees test: {expected_multiple}")
178186
print(f"✅ Single assignee test: {expected_single}")
179187
print(f"✅ No assignees test: {expected_none}")

0 commit comments

Comments
 (0)