Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Check GH token availability for Get-Changelog#25133

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
TravisEz13 merged 6 commits intomasterfromUseGHCLIAuthToken
Mar 7, 2025

Conversation

@jshigetomi
Copy link
Collaborator

@jshigetomijshigetomi commentedMar 6, 2025
edited
Loading

  • Check GH token availbility for Get-Changelog

PR Summary

This pull request includes changes to thetools/releaseTools.psm1 file to improve the handling of GitHub authentication tokens in theGet-ChangeLog function. The most important changes include making theToken parameter optional and adding a new function to check for an authentication token.

Improvements to GitHub token handling:

  • Modified theToken parameter inGet-ChangeLog to be optional instead of mandatory.
  • Added a newCheckForAuthToken function that checks for an existing GitHub CLI token or prompts the user to enter one if not found.
  • UpdatedGet-ChangeLog to callCheckForAuthToken if theToken parameter is not provided, ensuring a token is available for GitHub API requests.

PR Context

PR Checklist

@jshigetomijshigetomi added the CL-ToolsIndicates that a PR should be marked as a tools change in the Change Log labelMar 6, 2025
@jshigetomijshigetomi marked this pull request as ready for reviewMarch 7, 2025 18:05
@jshigetomijshigetomi requested a review froma team as acode ownerMarch 7, 2025 18:05
Comment on lines 372 to 380
$IsGHCLIInstalled=$false
try {
& gh--version>$null2>&1
$IsGHCLIInstalled=$true
}catch {
Write-Error-Message"GitHub CLI is not installed. Please install it from https://cli.github.com/"
}

if ($IsGHCLIInstalled) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
$IsGHCLIInstalled=$false
try {
& gh--version>$null2>&1
$IsGHCLIInstalled=$true
}catch {
Write-Error-Message"GitHub CLI is not installed. Please install it from https://cli.github.com/"
}
if ($IsGHCLIInstalled) {
$IsGHCLIInstalled=$false
if (Get-command-CommandType Application-Name gh-ErrorAction SilentlyContinue) {
$IsGHCLIInstalled=$true
}else {
Write-Error-Message"GitHub CLI is not installed. Please install it from https://cli.github.com/"-ErrorAction Stop
}
if ($IsGHCLIInstalled) {

Write-Output"[${version}]: https://github.com/PowerShell/PowerShell/compare/${LastReleaseTag}...${ThisReleaseTag}`n"
}

functionCheckForAuthToken {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
functionCheckForAuthToken {
functionGet-GHDefaultAuthToken {

)

if(-not$Token) {
$Token= CheckForAuthToken
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
$Token=CheckForAuthToken
$Token=Get-GHDefaultAuthToken

Copy link
Member

@TravisEz13TravisEz13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

review comments

@microsoft-github-policy-servicemicrosoft-github-policy-servicebot added the Waiting on AuthorThe PR was reviewed and requires changes or comments from the author before being accept labelMar 7, 2025
@microsoft-github-policy-servicemicrosoft-github-policy-servicebot removed the Waiting on AuthorThe PR was reviewed and requires changes or comments from the author before being accept labelMar 7, 2025
@jshigetomi
Copy link
CollaboratorAuthor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@TravisEz13TravisEz13 merged commit14f8003 intomasterMar 7, 2025
40 checks passed
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-servicebot commentedMar 7, 2025
edited by unfurl-linksbot
Loading

📣 Hey@jshigetomi, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗https://aka.ms/PSRepoFeedback

jshigetomi added a commit that referenced this pull requestMar 12, 2025
Co-authored-by: Justin Chung <chungjustin@microsoft.com>Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
@TravisEz13TravisEz13 deleted the UseGHCLIAuthToken branchMarch 24, 2025 17:54
pwshBot pushed a commit to pwshBot/PowerShell that referenced this pull requestApr 11, 2025
Co-authored-by: Justin Chung <chungjustin@microsoft.com>Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@TravisEz13TravisEz13TravisEz13 approved these changes

Assignees

No one assigned

Labels

BackPort-7.4.x-DoneBackPort-7.5.x-DoneCL-ToolsIndicates that a PR should be marked as a tools change in the Change Log

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@jshigetomi@TravisEz13

[8]ページ先頭

©2009-2025 Movatter.jp