Skip to content

Commit

Permalink
fixing gh pr and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelcolas committed Mar 9, 2021
1 parent cd8d947 commit d4d65c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .build/tasks/New-Release.GitHub.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ task Create_ChangeLog_GitHub_PR -if ($GitHubToken -and (Get-Module -Name PowerSh

$BranchName = "updateChangelogAfter$TagVersion"
git checkout -B $BranchName

try
{
Write-Build DarkGray "Updating Changelog file"
Expand All @@ -209,6 +210,8 @@ task Create_ChangeLog_GitHub_PR -if ($GitHubToken -and (Get-Module -Name PowerSh
git commit -m "Updating ChangeLog since $TagVersion +semver:skip"

$remoteURL = [URI](git remote get-url origin)
$repoInfo = Get-GHOwnerRepoFromRemoteUrl -RemoteUrl $remoteURL

$URI = $remoteURL.Scheme + [URI]::SchemeDelimiter + $GitHubToken + '@' + $remoteURL.Authority + $remoteURL.PathAndQuery

# Update the PUSH URI to use the Personal Access Token for Auth
Expand All @@ -219,7 +222,8 @@ task Create_ChangeLog_GitHub_PR -if ($GitHubToken -and (Get-Module -Name PowerSh

$NewPullRequestParams = @{
AccessToken = $GitHubToken
Uri = $remoteURL
OwnerName = $repoInfo.Owner
RepositoryName = $repoInfo.Repository
Title = "Updating ChangeLog since release of $TagVersion"
Head = $BranchName
Base = $MainGitBranch
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed RootModule not loaded because of Module Manifest.
- Making this project use the prerelease version of Sampler for testing.
- Display GitHub Release info if already exists.
- GitHub New PR to use Owner/Repo name.

### Fixed

Expand Down

0 comments on commit d4d65c3

Please sign in to comment.