Skip to content

Conversation

@MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Dec 5, 2024

Description

  • Fixes 🚀[Feature]: Automatically handle Installation Access Tokens when running commands as a GitHub App #170
  • Added function to get named and authenticated app, Get-GitHubApp.
  • Added a private function to get parameters used by parent function. Used to get the parameters passed to a GitHub function to determine what IAT context to use. i.e. if "Owner" is "PSModule" on a GitHub function, the Get-FunctionParameter that is called in Resolve-GitHubContext get the grandparent parameter, and looks for a context that can be used towards "PSModule", with matching ClientIDs.
  • GitHubContext class, added a 'Type' parameter to determine if the type is a 'App' 'Installation' or 'User'.
  • Added Assert-GitHubContext to start building a "rule engine" for functions. In the future it will be added to all GitHub functions to determine if the context that is used has the needed type, permission etc. For this PR it is used in the Connect-GitHubApp function as it should only be run if the context is an App.
  • Updated Set-GitHubContext to name IAT based context by the following pattern hostname/login/targetname.
  • Added ouput/passthru functionality to Update-GitHubUserAccessToken that refreshed UATs. This to avoid it having to store it in a context and then directly after having to go get it again from the context. And cleaned up the call in Invoke-GitHubAPI.
  • Updated output type of New-GitHubAppInstallationAccessToken

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 self-assigned this Dec 5, 2024
@MariusStorhaug MariusStorhaug requested a review from a team as a code owner December 5, 2024 22:26
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2024

GitHub release for GitHub v0.9.17-AutoManageIAT1 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.9.17-AutoManageIAT2 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.9.17-AutoManageIAT3 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.9.17-AutoManageIAT4 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.9.17-AutoManageIAT5 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.9.17-AutoManageIAT6 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.9.17-AutoManageIAT7 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.9.17-AutoManageIAT8 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.10.0-AutoManageIAT1 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.10.0-AutoManageIAT2 has been created.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.10.0-AutoManageIAT3 has been created.

@MariusStorhaug MariusStorhaug merged commit acd573f into main Dec 6, 2024
7 checks passed
@MariusStorhaug MariusStorhaug deleted the AutoManageIAT branch December 6, 2024 23:27
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

GitHub release for GitHub v0.10.0 has been created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

🚀[Feature]: Automatically handle Installation Access Tokens when running commands as a GitHub App

2 participants