-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support authenticating as GitHub Apps instead of using Personal Access Tokens #1311
Draft
freddydk
wants to merge
36
commits into
microsoft:main
Choose a base branch
from
freddydk:noPAT
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
a091a35
Support GitHub App Auth
freddydk 9463f40
catch
freddydk dd0cbea
10
freddydk 7c7253d
dumps
freddydk 32aab8d
mask multi
freddydk 0c191ab
add message
freddydk df1c6e6
precommit
freddydk ff16e55
token exchange
freddydk add7df9
getreal
freddydk 38b7860
tests
freddydk af60cca
getreal
freddydk 6f09716
x
freddydk e3e4968
use real
freddydk 0f9ae18
use real
freddydk d0157f6
no user
freddydk f358ab8
use githubOwner
freddydk 936c912
dump
freddydk 945ca71
use repo
freddydk dae2cdc
no config
freddydk cd8b221
use repo
freddydk 1524490
fix token
freddydk 28232d6
mask value
freddydk 1402a6f
move
freddydk 9491ba7
use gh
freddydk 9c30d28
remove silent
freddydk 8b10b20
remove line breaks
freddydk 3f1c796
Merge branch 'main' into noPAT
freddydk e9ee5e8
fix e2e
freddydk 2501a3b
Merge branch 'noPAT' of https://github.com/freddydk/AL-Go into noPAT
freddydk 112ebc3
silent
freddydk 85014aa
use gfh
freddydk cea8eda
jit
freddydk 9ba3af2
use real token
freddydk cdd459c
get token for repo
freddydk d7d440b
inc count
freddydk cd03ea6
token cache
freddydk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -19,7 +19,7 @@ $defaultCICDPushBranches = @( 'main', 'release/*', 'feature/*' ) | |
$defaultCICDPullRequestBranches = @( 'main' ) | ||
$runningLocal = $local.IsPresent | ||
$defaultBcContainerHelperVersion = "preview" # Must be double quotes. Will be replaced by BcContainerHelperVersion if necessary in the deploy step - ex. "https://github.com/organization/navcontainerhelper/archive/refs/heads/branch.zip" | ||
$notSecretProperties = @("Scopes","TenantId","BlobName","ContainerName","StorageAccountName","ServerUrl","ppUserName") | ||
$notSecretProperties = @("Scopes","TenantId","BlobName","ContainerName","StorageAccountName","ServerUrl","ppUserName","GitHubAppClientId") | ||
|
||
$runAlPipelineOverrides = @( | ||
"DockerPull" | ||
|
@@ -1315,12 +1315,13 @@ function CloneIntoNewFolder { | |
$baseFolder = Join-Path ([System.IO.Path]::GetTempPath()) ([Guid]::NewGuid().ToString()) | ||
New-Item $baseFolder -ItemType Directory | Out-Null | ||
Set-Location $baseFolder | ||
$serverUri = [Uri]::new($env:GITHUB_SERVER_URL) | ||
$serverUrl = "$($serverUri.Scheme)://$($actor):$($token)@$($serverUri.Host)/$($env:GITHUB_REPOSITORY)" | ||
|
||
# Environment variables for hub commands | ||
$env:GITHUB_USER = $actor | ||
$env:GITHUB_TOKEN = $token | ||
$env:GITHUB_TOKEN = GetRealToken -token $token | ||
|
||
$serverUri = [Uri]::new($env:GITHUB_SERVER_URL) | ||
$serverUrl = "$($serverUri.Scheme)://$($env:GITHUB_USER):$($env:GITHUB_TOKEN)@$($serverUri.Host)/$($env:GITHUB_REPOSITORY)" | ||
|
||
# Configure git | ||
invoke-git config --global user.email "[email protected]" | ||
|
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
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a library to use instead of these calculations?
If we are to do our own implementation, let's create a separate PS module for JWT. Something that could be tested preferably.