Skip to content

Commit 253cf2d

Browse files
committed
Create new module to aid in interacting with the RFC repo
There are some other more general git/github tools here as well
1 parent 249e8d8 commit 253cf2d

File tree

4 files changed

+600
-0
lines changed

4 files changed

+600
-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: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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 = 'Unknown'
28+
29+
# Copyright statement for this module
30+
Copyright = '(c) jimtru. All rights reserved.'
31+
32+
# Description of the functionality provided by this module
33+
# Description = ''
34+
35+
# Minimum version of the PowerShell engine required by this module
36+
# PowerShellVersion = ''
37+
38+
# Name of the PowerShell host required by this module
39+
# PowerShellHostName = ''
40+
41+
# Minimum version of the PowerShell host required by this module
42+
# PowerShellHostVersion = ''
43+
44+
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45+
# DotNetFrameworkVersion = ''
46+
47+
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48+
# CLRVersion = ''
49+
50+
# Processor architecture (None, X86, Amd64) required by this module
51+
# ProcessorArchitecture = ''
52+
53+
# Modules that must be imported into the global environment prior to importing this module
54+
# RequiredModules = @()
55+
56+
# Assemblies that must be loaded prior to importing this module
57+
# RequiredAssemblies = @()
58+
59+
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60+
# ScriptsToProcess = @()
61+
62+
# Type files (.ps1xml) to be loaded when importing this module
63+
TypesToProcess = @('RFC.Types.ps1xml')
64+
65+
# Format files (.ps1xml) to be loaded when importing this module
66+
FormatsToProcess = @('RFC.Formats.ps1xml')
67+
68+
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69+
# NestedModules = @()
70+
71+
# 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.
72+
FunctionsToExport = @(
73+
'Get-MaxRFCNumber', 'Get-MaxRFC', 'Get-PullRFCNumber', 'Get-RFCPullRequest',
74+
'Get-HighestPullRFCNumber', 'Get-NextRFCNumber', 'Get-NextRFCFileName', 'Get-GitFork',
75+
'Get-GitBranchesFromFork', 'Get-GitTreeFromBranch', 'Get-LastCommit', 'Get-RepoFileList',
76+
'Get-PR'
77+
)
78+
79+
# 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.
80+
CmdletsToExport = @()
81+
82+
# Variables to export from this module
83+
VariablesToExport = '*'
84+
85+
# 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.
86+
AliasesToExport = @()
87+
88+
# DSC resources to export from this module
89+
# DscResourcesToExport = @()
90+
91+
# List of all modules packaged with this module
92+
# ModuleList = @()
93+
94+
# List of all files packaged with this module
95+
# FileList = @()
96+
97+
# 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.
98+
PrivateData = @{
99+
100+
PSData = @{
101+
102+
# Tags applied to this module. These help with module discovery in online galleries.
103+
# Tags = @()
104+
105+
# A URL to the license for this module.
106+
# LicenseUri = ''
107+
108+
# A URL to the main website for this project.
109+
# ProjectUri = ''
110+
111+
# A URL to an icon representing this module.
112+
# IconUri = ''
113+
114+
# ReleaseNotes of this module
115+
# ReleaseNotes = ''
116+
117+
} # End of PSData hashtable
118+
119+
} # End of PrivateData hashtable
120+
121+
# HelpInfo URI of this module
122+
# HelpInfoURI = ''
123+
124+
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
125+
# DefaultCommandPrefix = ''
126+
127+
}
128+
129+
130+

0 commit comments

Comments
 (0)