Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PSModule/GitHub
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.33.0
Choose a base ref
...
head repository: PSModule/GitHub
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.33.1
Choose a head ref
  • 1 commit
  • 8 files changed
  • 1 contributor

Commits on Jul 1, 2025

  1. 🩹 [Patch]: Add a dynamically format property for GitHubContext (#449)

    ## Description
    
    This pull request introduces a new `Remaining` property to GitHub
    context types and updates the display format to show the time remaining
    until token expiration. The changes improve the clarity and usability of
    token expiration information by providing both textual and color-coded
    visual indicators.
    
    ### Enhancements to GitHub context display:
    
    * **Added a new column for `Remaining` in the table display**:
    - Updated `src/formats/GitHubContext.Format.ps1xml` to include a
    `Remaining` column header and display logic for the time remaining until
    token expiration. The display uses a color-coded system based on the
    ratio of remaining time to the maximum allowed duration, enhancing
    visual clarity.
    [[1]](diffhunk://#diff-c7dd80cd4c4440ccbe24930842a2e172614dbfd79d31393d68852200eacc2c74R29-R31)
    [[2]](diffhunk://#diff-c7dd80cd4c4440ccbe24930842a2e172614dbfd79d31393d68852200eacc2c74R55-R97)
    
    ### GitHub context types improvements:
    
    * **Introduced the `Remaining` property for token expiration**:
    - Added a `Remaining` script property to both
    `InstallationGitHubContext` and `UserGitHubContext` types in
    `src/types/GitHubContext.Types.ps1xml`. This property calculates the
    time span between the current date and the token expiration date,
    enabling the new display functionality.
    
    ## Type of change
    
    <!-- Use the check-boxes [x] on the options that are relevant. -->
    
    - [ ] 📖 [Docs]
    - [ ] 🪲 [Fix]
    - [x] 🩹 [Patch]
    - [ ] ⚠️ [Security fix]
    - [ ] 🚀 [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
    MariusStorhaug authored Jul 1, 2025
    Configuration menu
    Copy the full SHA
    1b4773a View commit details
    Browse the repository at this point in the history
Loading