Skip to content

Commit d56aaef

Browse files
🪲 [Fix]: Fix GitHubContext formats by consolidating to a view (#434)
## Description This pull request consolidates the format definitions for different `GitHubContext` types (`AppGitHubContext`, `InstallationGitHubContext`, and `UserGitHubContext`) into a single file, `src/formats/GitHubContext.Format.ps1xml`. It removes redundant files and ensures all context types are handled in a unified manner. ### Consolidation of format definitions: * Added support for `AppGitHubContext`, `InstallationGitHubContext`, and `UserGitHubContext` in the unified `GitHubContext.Format.ps1xml` file. This includes reusing the list view for all `GitHubContext` classes and moving views (`AppGitHubContextListView`, `InstallationGitHubContextListView`, `UserGitHubContextListView`) to the file. ### Removal of redundant files: * Removed redundant files: * `src/formats/GitHubContextApp.Format.ps1xml` * `src/formats/GitHubContextInstallation.Format.ps1xml` * `src/formats/GitHubContextUser.Format.ps1xml` ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 175967a commit d56aaef

File tree

4 files changed

+204
-339
lines changed

4 files changed

+204
-339
lines changed

src/formats/GitHubContext.Format.ps1xml

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<View>
55
<Name>GitHubContextTableView</Name>
66
<ViewSelectedBy>
7+
<TypeName>AppGitHubContext</TypeName>
8+
<TypeName>InstallationGitHubContext</TypeName>
9+
<TypeName>UserGitHubContext</TypeName>
710
<TypeName>GitHubContext</TypeName>
811
</ViewSelectedBy>
912
<TableControl>
@@ -106,5 +109,206 @@
106109
</ListEntries>
107110
</ListControl>
108111
</View>
112+
<View>
113+
<Name>AppGitHubContextListView</Name>
114+
<ViewSelectedBy>
115+
<TypeName>AppGitHubContext</TypeName>
116+
</ViewSelectedBy>
117+
<ListControl>
118+
<ListEntries>
119+
<ListEntry>
120+
<ListItems>
121+
<ListItem>
122+
<PropertyName>Name</PropertyName>
123+
</ListItem>
124+
<ListItem>
125+
<PropertyName>Type</PropertyName>
126+
</ListItem>
127+
<ListItem>
128+
<PropertyName>AuthType</PropertyName>
129+
</ListItem>
130+
<ListItem>
131+
<PropertyName>TokenType</PropertyName>
132+
</ListItem>
133+
<ListItem>
134+
<PropertyName>HostName</PropertyName>
135+
</ListItem>
136+
<ListItem>
137+
<PropertyName>UserName</PropertyName>
138+
</ListItem>
139+
<ListItem>
140+
<PropertyName>ClientID</PropertyName>
141+
</ListItem>
142+
<ListItem>
143+
<PropertyName>OwnerName</PropertyName>
144+
</ListItem>
145+
<ListItem>
146+
<PropertyName>OwnerType</PropertyName>
147+
</ListItem>
148+
<ListItem>
149+
<PropertyName>Permissions</PropertyName>
150+
</ListItem>
151+
<ListItem>
152+
<PropertyName>Events</PropertyName>
153+
</ListItem>
154+
<ListItem>
155+
<PropertyName>ApiBaseUri</PropertyName>
156+
</ListItem>
157+
<ListItem>
158+
<PropertyName>Enterprise</PropertyName>
159+
</ListItem>
160+
<ListItem>
161+
<PropertyName>Owner</PropertyName>
162+
</ListItem>
163+
<ListItem>
164+
<PropertyName>Repository</PropertyName>
165+
</ListItem>
166+
<ListItem>
167+
<PropertyName>HttpVersion</PropertyName>
168+
</ListItem>
169+
<ListItem>
170+
<PropertyName>PerPage</PropertyName>
171+
</ListItem>
172+
</ListItems>
173+
</ListEntry>
174+
</ListEntries>
175+
</ListControl>
176+
</View>
177+
<View>
178+
<Name>InstallationGitHubContextListView</Name>
179+
<ViewSelectedBy>
180+
<TypeName>InstallationGitHubContext</TypeName>
181+
</ViewSelectedBy>
182+
<ListControl>
183+
<ListEntries>
184+
<ListEntry>
185+
<ListItems>
186+
<ListItem>
187+
<PropertyName>Name</PropertyName>
188+
</ListItem>
189+
<ListItem>
190+
<PropertyName>Type</PropertyName>
191+
</ListItem>
192+
<ListItem>
193+
<PropertyName>AuthType</PropertyName>
194+
</ListItem>
195+
<ListItem>
196+
<PropertyName>TokenType</PropertyName>
197+
</ListItem>
198+
<ListItem>
199+
<PropertyName>HostName</PropertyName>
200+
</ListItem>
201+
<ListItem>
202+
<PropertyName>UserName</PropertyName>
203+
</ListItem>
204+
<ListItem>
205+
<PropertyName>ClientID</PropertyName>
206+
</ListItem>
207+
<ListItem>
208+
<PropertyName>InstallationID</PropertyName>
209+
</ListItem>
210+
<ListItem>
211+
<PropertyName>TokenExpirationDate</PropertyName>
212+
</ListItem>
213+
<ListItem>
214+
<PropertyName>InstallationType</PropertyName>
215+
</ListItem>
216+
<ListItem>
217+
<PropertyName>InstallationName</PropertyName>
218+
</ListItem>
219+
<ListItem>
220+
<PropertyName>Permissions</PropertyName>
221+
</ListItem>
222+
<ListItem>
223+
<PropertyName>Events</PropertyName>
224+
</ListItem>
225+
<ListItem>
226+
<PropertyName>ApiBaseUri</PropertyName>
227+
</ListItem>
228+
<ListItem>
229+
<PropertyName>Enterprise</PropertyName>
230+
</ListItem>
231+
<ListItem>
232+
<PropertyName>Owner</PropertyName>
233+
</ListItem>
234+
<ListItem>
235+
<PropertyName>Repository</PropertyName>
236+
</ListItem>
237+
<ListItem>
238+
<PropertyName>HttpVersion</PropertyName>
239+
</ListItem>
240+
<ListItem>
241+
<PropertyName>PerPage</PropertyName>
242+
</ListItem>
243+
</ListItems>
244+
</ListEntry>
245+
</ListEntries>
246+
</ListControl>
247+
</View>
248+
<View>
249+
<Name>UserGitHubContextListView</Name>
250+
<ViewSelectedBy>
251+
<TypeName>UserGitHubContext</TypeName>
252+
</ViewSelectedBy>
253+
<ListControl>
254+
<ListEntries>
255+
<ListEntry>
256+
<ListItems>
257+
<ListItem>
258+
<PropertyName>Name</PropertyName>
259+
</ListItem>
260+
<ListItem>
261+
<PropertyName>Type</PropertyName>
262+
</ListItem>
263+
<ListItem>
264+
<PropertyName>AuthType</PropertyName>
265+
</ListItem>
266+
<ListItem>
267+
<PropertyName>TokenType</PropertyName>
268+
</ListItem>
269+
<ListItem>
270+
<PropertyName>HostName</PropertyName>
271+
</ListItem>
272+
<ListItem>
273+
<PropertyName>UserName</PropertyName>
274+
</ListItem>
275+
<ListItem>
276+
<PropertyName>AuthClientID</PropertyName>
277+
</ListItem>
278+
<ListItem>
279+
<PropertyName>DeviceFlowType</PropertyName>
280+
</ListItem>
281+
<ListItem>
282+
<PropertyName>Scope</PropertyName>
283+
</ListItem>
284+
<ListItem>
285+
<PropertyName>TokenExpirationDate</PropertyName>
286+
</ListItem>
287+
<ListItem>
288+
<PropertyName>RefreshTokenExpirationDate</PropertyName>
289+
</ListItem>
290+
<ListItem>
291+
<PropertyName>ApiBaseUri</PropertyName>
292+
</ListItem>
293+
<ListItem>
294+
<PropertyName>Enterprise</PropertyName>
295+
</ListItem>
296+
<ListItem>
297+
<PropertyName>Owner</PropertyName>
298+
</ListItem>
299+
<ListItem>
300+
<PropertyName>Repository</PropertyName>
301+
</ListItem>
302+
<ListItem>
303+
<PropertyName>HttpVersion</PropertyName>
304+
</ListItem>
305+
<ListItem>
306+
<PropertyName>PerPage</PropertyName>
307+
</ListItem>
308+
</ListItems>
309+
</ListEntry>
310+
</ListEntries>
311+
</ListControl>
312+
</View>
109313
</ViewDefinitions>
110314
</Configuration>

src/formats/GitHubContextApp.Format.ps1xml

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)