Skip to content

Commit e68275c

Browse files
authored
Merge pull request #168 from JamesWTruher/RFCModule
Create new module to aid in interacting with the RFC repo
2 parents 911ce01 + 0d31450 commit e68275c

File tree

4 files changed

+558
-0
lines changed

4 files changed

+558
-0
lines changed

tools/Modules/RFC/RFC.Formats.ps1xml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<Configuration>
2+
<ViewDefinitions>
3+
<View>
4+
<Name>RepoFileTable</Name>
5+
<ViewSelectedBy>
6+
<TypeName>RepoFile</TypeName>
7+
</ViewSelectedBy>
8+
<TableControl>
9+
<TableHeaders>
10+
<TableColumnHeader><Label>size</Label></TableColumnHeader>
11+
<TableColumnHeader><Label>path</Label></TableColumnHeader>
12+
<TableColumnHeader><Label>FileUrl</Label></TableColumnHeader>
13+
</TableHeaders>
14+
<TableRowEntries>
15+
<TableRowEntry>
16+
<TableColumnItems>
17+
<TableColumnItem><Alignment>Right</Alignment><PropertyName>size</PropertyName></TableColumnItem>
18+
<TableColumnItem><PropertyName>path</PropertyName></TableColumnItem>
19+
<TableColumnItem><PropertyName>FileUrl</PropertyName></TableColumnItem>
20+
</TableColumnItems>
21+
</TableRowEntry>
22+
</TableRowEntries>
23+
</TableControl>
24+
</View>
25+
<View>
26+
<Name>PullRequestTable</Name>
27+
<ViewSelectedBy>
28+
<TypeName>GitPullRequest</TypeName>
29+
</ViewSelectedBy>
30+
<TableControl>
31+
<TableHeaders>
32+
<TableColumnHeader><Label>Number</Label></TableColumnHeader>
33+
<TableColumnHeader><Label>Author</Label></TableColumnHeader>
34+
<TableColumnHeader><Label>Updated</Label></TableColumnHeader>
35+
<TableColumnHeader><Label>Title</Label></TableColumnHeader>
36+
</TableHeaders>
37+
<TableRowEntries>
38+
<TableRowEntry>
39+
<TableColumnItems>
40+
<TableColumnItem><Alignment>Right</Alignment><PropertyName>Number</PropertyName></TableColumnItem>
41+
<TableColumnItem><PropertyName>author</PropertyName></TableColumnItem>
42+
<TableColumnItem><FormatString>g</FormatString><PropertyName>updated</PropertyName></TableColumnItem>
43+
<TableColumnItem><PropertyName>Title</PropertyName></TableColumnItem>
44+
</TableColumnItems>
45+
</TableRowEntry>
46+
</TableRowEntries>
47+
</TableControl>
48+
</View>
49+
<View>
50+
<Name>GitForkInfoTable</Name>
51+
<ViewSelectedBy>
52+
<TypeName>GitForkInfo</TypeName>
53+
</ViewSelectedBy>
54+
<TableControl>
55+
<TableHeaders>
56+
<TableColumnHeader><Label>pushed_at</Label></TableColumnHeader>
57+
<TableColumnHeader><Label>html_url</Label></TableColumnHeader>
58+
</TableHeaders>
59+
<TableRowEntries>
60+
<TableRowEntry>
61+
<TableColumnItems>
62+
<TableColumnItem><FormatString>g</FormatString><PropertyName>pushed_at</PropertyName></TableColumnItem>
63+
<TableColumnItem><PropertyName>html_url</PropertyName></TableColumnItem>
64+
</TableColumnItems>
65+
</TableRowEntry>
66+
</TableRowEntries>
67+
</TableControl>
68+
</View>
69+
</ViewDefinitions>
70+
</Configuration>

tools/Modules/RFC/RFC.Types.ps1xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<Types>
2+
<Type>
3+
<Name>GitPullRequest</Name>
4+
<Members>
5+
<ScriptProperty>
6+
<Name>Number</Name>
7+
<GetScriptBlock>
8+
[int]($this.url.split("/")[-1])
9+
</GetScriptBlock>
10+
</ScriptProperty>
11+
<ScriptProperty>
12+
<Name>Author</Name>
13+
<GetScriptBlock>
14+
$this.user.login
15+
</GetScriptBlock>
16+
</ScriptProperty>
17+
<AliasProperty>
18+
<Name>Created</Name>
19+
<ReferencedMemberName>
20+
created_at
21+
</ReferencedMemberName>
22+
</AliasProperty>
23+
<AliasProperty>
24+
<Name>Updated</Name>
25+
<ReferencedMemberName>
26+
updated_at
27+
</ReferencedMemberName>
28+
</AliasProperty>
29+
</Members>
30+
</Type>
31+
</Types>

tools/Modules/RFC/RFC.psd1

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#
2+
# Module manifest for module 'RFC'
3+
#
4+
# Generated by: jimtru
5+
#
6+
# Generated on: 4/22/19
7+
#
8+
9+
@{
10+
11+
# Script module or binary module file associated with this manifest.
12+
RootModule = 'RFC.psm1'
13+
14+
# Version number of this module.
15+
ModuleVersion = '0.0.1'
16+
17+
# Supported PSEditions
18+
# CompatiblePSEditions = @()
19+
20+
# ID used to uniquely identify this module
21+
GUID = 'e05ba184-7bd8-4a16-9f41-93d7c7bd4ee6'
22+
23+
# Author of this module
24+
Author = 'jimtru'
25+
26+
# Company or vendor of this module
27+
CompanyName = 'Microsoft'
28+
29+
# Copyright statement for this module
30+
Copyright = 'Copyright (c) Microsoft Corporation. All rights reserved.'
31+
32+
# Description of the functionality provided by this module
33+
# Description = ''
34+
35+
36+
# Type files (.ps1xml) to be loaded when importing this module
37+
TypesToProcess = @('RFC.Types.ps1xml')
38+
39+
# Format files (.ps1xml) to be loaded when importing this module
40+
FormatsToProcess = @('RFC.Formats.ps1xml')
41+
42+
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
43+
FunctionsToExport = @(
44+
'Get-MaxRFCNumber', 'Get-MaxRFC', 'Get-PullRFCNumber', 'Get-RFCPullRequest',
45+
'Get-HighestPullRFCNumber', 'Get-NextRFCNumber', 'Get-NextRFCFileName', 'Get-GitFork',
46+
'Get-GitBranchesFromFork', 'Get-GitTreeFromBranch', 'Get-LastCommit', 'Get-RepoFileList',
47+
'Get-PR',
48+
"Set-Header", "Get-Header", "Remove-Header"
49+
)
50+
51+
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
52+
CmdletsToExport = @()
53+
54+
# Variables to export from this module
55+
VariablesToExport = '*'
56+
57+
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
58+
AliasesToExport = @()
59+
60+
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
61+
PrivateData = @{
62+
63+
PSData = @{
64+
65+
} # End of PSData hashtable
66+
67+
} # End of PrivateData hashtable
68+
69+
}
70+
71+
72+

0 commit comments

Comments
 (0)