-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from StartAutomating/ugit-an-update
ugit 0.4.1
- Loading branch information
Showing
55 changed files
with
777 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
name: ugit-psa | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
SendPSA: | ||
runs-on: ubuntu-latest | ||
if: ${{ success() }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: PSA | ||
uses: StartAutomating/PSA@main | ||
id: PSA | ||
env: | ||
AT_PROTOCOL_HANDLE: mrpowershell.bsky.social | ||
AT_PROTOCOL_APP_PASSWORD: ${{ secrets.AT_PROTOCOL_APP_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<# | ||
.Synopsis | ||
Git Submodule Extension | ||
.Description | ||
Git Submodule as objects. | ||
.EXAMPLE | ||
git submodule | ||
#> | ||
[Management.Automation.Cmdlet("Out","Git")] # It's an extension for Out-Git | ||
[ValidatePattern("^(?:git)\s(?:submodule)\s(?:status)?$")] # that is run when git submodule is run (with no other options (except for status)). | ||
param() | ||
|
||
begin { | ||
$submoduleLines = @() | ||
} | ||
|
||
process { | ||
$submoduleLines += $gitOut | ||
} | ||
|
||
end { | ||
if ($gitArgument -match '--(?>n|dry-run)') { | ||
return $submoduleLines | ||
} | ||
|
||
foreach ($line in $submoduleLines) { | ||
if ($line -match '^\s{0,}[\+]?(?<CommitHash>[0-9a-f]{10,})\s(?<SubModule>\S+)\s\((?<Reference>[^\)]+)\)') { | ||
$Matches.Remove(0) | ||
$toObject = [Ordered]@{ | ||
PSTypeName = 'git.submodule.status' | ||
GitOutputLines = $submoduleLines | ||
GitRoot = $gitRoot | ||
} + $Matches | ||
[PSCustomObject]$toObject | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Write-FormatView -TypeName git.submodule.status -Property Submodule, Reference, CommitHash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@{ | ||
"runs-on" = "ubuntu-latest" | ||
if = '${{ success() }}' | ||
steps = @( | ||
@{ | ||
name = 'Check out repository' | ||
uses = 'actions/checkout@v2' | ||
}, | ||
@{ | ||
name = 'PSA' | ||
uses = 'StartAutomating/PSA@main' | ||
id = 'PSA' | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
@{ | ||
HasUpstream = 'IsTracked' | ||
Compare = 'Diff' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
param() | ||
|
||
$firstArg, $restOfArgs = | ||
if (-not $args) { | ||
git remote | git remote show | Select-Object -ExpandProperty HeadBranch -First 1 | ||
} else { | ||
$args | Select-Object -First 1 | ||
$args | Select-Object -Skip 1 | ||
} | ||
|
||
$restOfArgs = @($restOfArgs) | ||
|
||
Push-Location $this.GitRoot | ||
git diff "$($firstArg)..$($this.BranchName)" @restOfArgs | ||
Pop-Location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if (-not $args) { | ||
throw "Must provide a new branch name" | ||
} | ||
Push-Location $this.GitRoot | ||
git branch '-m' $this.BranchName @args | ||
Pop-Location |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.