Skip to content

Conversation

@MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Mar 17, 2025

Description

This pull request introduces several functions to manage Variables on GitHub, including a class, formats and all functions to cover all API endpoint regarding variables.

Classes and formats:

  • GitHubVariable: Added a new class GitHubVariable to represent GitHub variable details.
  • GitHubVariable.Format.ps1xml: Added XML formatting for the GitHubVariable class to define table and list views.

New public functions:

  • src/functions/public/Variables/Get-GitHubVariable.ps1
  • src/functions/public/Variables/New-GitHubVariable.ps1
  • src/functions/public/Variables/Remove-GitHubVariable.ps1
  • src/functions/public/Variables/Set-GitHubVariable.ps1
  • src/functions/public/Variables/Update-GitHubVariable.ps1
  • src/functions/public/Variables/SelectedRepository/Set-GitHubVariableSelectedRepository.ps1
  • src/functions/public/Variables/SelectedRepository/Remove-GitHubVariableSelectedRepository.ps1
  • src/functions/public/Variables/SelectedRepository/Get-GitHubVariableSelectedRepository.ps1
  • src/functions/public/Variables/SelectedRepository/Add-GitHubVariableSelectedRepository.ps1
  • numerous private functions to cover different scopes of managing variables on organization, repository and environment.

Tests:

  • tests/Variables.Tests.ps1: Added tests to cover the new functions.

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

pmatthews05 and others added 3 commits March 16, 2025 08:42
## Description
This includes new commands:
- Get-GitHubVariable.ps1
- Set-GitHubVariable.ps1
- Remove-GitHubVariable.ps1
- Get-GitHubEnvironment.ps1
- Set-GitHubEnvironment.ps1
- Remove-GitHubEnvironment.ps1

## Type of change

<!-- Use the check-boxes [x] on the options that are relevant. -->

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

## Checklist
<!-- Use the check-boxes [x] on the options that are relevant. -->

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

---------

Co-authored-by: Marius Storhaug <marstor@hotmail.com>
@MariusStorhaug MariusStorhaug self-assigned this Mar 17, 2025
@Copilot Copilot AI review requested due to automatic review settings March 17, 2025 08:57
@MariusStorhaug MariusStorhaug requested a review from a team as a code owner March 17, 2025 08:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

MariusStorhaug and others added 21 commits March 17, 2025 10:06
…ing GitHub variables on repositories and environments
…s for consistency and clarity; add Update-GitHubVariableOnRepository and Update-GitHubVariableOnEnvironment functions for managing GitHub variables.
…-GitHubVariableOnOwner function for improved flexibility
…nction to include variable name for precise targeting
… streamline GitHub App connection logic in Repositories.Tests.ps1 for improved clarity and organization
… streamline repository-related tests for improved clarity and organization
…ts.ps1, Repositories.Tests.ps1, and Variables.Tests.ps1 for improved test isolation
…n PSModule.yml for improved clarity and maintenance
…g line warnings in test files for improved clarity and maintainability
…iables.Tests.ps1 for improved consistency and reliability
…og group for improved readability and structure in Variables.Tests.ps1
@MariusStorhaug MariusStorhaug merged commit dd2af30 into main Mar 30, 2025
@MariusStorhaug MariusStorhaug deleted the variables branch March 30, 2025 17:19
@github-project-automation github-project-automation bot moved this from In Progress to Done in GitHub PowerShell Module Mar 30, 2025
@github-actions
Copy link
Contributor

Module GitHub - 0.19.0 published to the PowerShell Gallery.

@github-actions
Copy link
Contributor

GitHub release for GitHub v0.19.0 has been created.

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

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants