Skip to content

Conversation

@MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Dec 11, 2024

Description

This pull request includes updates to the PowerShell scripts for GitHub authentication and context management. The key changes enhance the handling of GitHub App tokens, add verbosity, and improve the flexibility of the authentication process.

Enhancements to Get-GitHubAppJSONWebToken function:

  • Added begin, process, and end blocks to improve logging and structure. [1] [2]

Improvements to Connect-GitHubAccount function:

  • Introduced a new Shallow parameter to avoid loading tokens for GitHub App installations.
  • Removed default values for Owner and Repo parameters to enhance flexibility.
  • Added logic to set TargetType, Enterprise, TargetName, Owner, and Repo from the GitHub event context.
  • Updated context dictionary to include TargetType and TargetName.
  • Replaced Get-GitHubApp with Connect-GitHubApp -Shallow:$Shallow for more consistent app connection handling.

Updates to Connect-GitHubApp function:

  • Added a Shallow parameter to control whether to load full credentials or just metadata for GitHub App installations. [1] [2]

Modification to Set-GitHubContext function:

  • Adjusted the context name format to include TargetType and TargetName for better clarity.

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@MariusStorhaug MariusStorhaug requested a review from a team as a code owner December 11, 2024 18:37
@MariusStorhaug MariusStorhaug changed the title Apps2 🩹 [Patch]: Improve IAT loading and storing of target info Dec 11, 2024
@MariusStorhaug MariusStorhaug merged commit 0da229e into main Dec 11, 2024
6 checks passed
@MariusStorhaug MariusStorhaug deleted the apps2 branch December 11, 2024 19:23
@github-actions
Copy link
Contributor

Module [GitHub - 0.11.4] published to the PowerShell Gallery.

@github-actions
Copy link
Contributor

GitHub release for GitHub v0.11.4 has been created.

@MariusStorhaug MariusStorhaug self-assigned this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants