Types/LibGit2Sharp.Commit.Types.ps1xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<Types>
    <Type>
        <Name>LibGit2Sharp.Commit</Name>
        <Members>
            <ScriptProperty>
                <!-- The second-last part of the URL path -->
                <Name>Owner</Name>
                <GetScriptBlock>
                    $this.Repository.Owner
                </GetScriptBlock>
            </ScriptProperty>
            <ScriptProperty>
                <!-- The last path part of the URL path, without the .git extension -->
                <Name>RepositoryName</Name>
                <GetScriptBlock>
                    $this.Repository.RepositoryName
                </GetScriptBlock>
            </ScriptProperty>
            <ScriptProperty>
                <Name>Body</Name>
                <GetScriptBlock>
                    $index = $this.Message.IndexOf("`n")
                    if ($index -eq -1) {
                        return ""
                    }
                    return $this.Message.Substring($index + 1).Trim()
                </GetScriptBlock>
            </ScriptProperty>
            <ScriptProperty>
                <Name>Refs</Name>
                <GetScriptBlock>
                    $refs = $this.Repository.RefsByTarget[$this]
                    if ($null -eq $refs) { @() } else { $refs }
                </GetScriptBlock>
            </ScriptProperty>
        </Members>
    </Type>
</Types>