Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

fix: Don't try to revoke a token that has already expired #109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wwsean08
Copy link

@wwsean08 wwsean08 commented Apr 1, 2024

This is a PR to fix when a CI job fails because it tries to revoke a token which has already expired. Given that github provides the expiration time, it's worth referencing that and preventing the error in the first place.

Testing

This was tested using an internal repostiory, below are the workflow files and the results:

Skipping revoke as it's expired

name: Testing app rejection update
on:
  push:
    branches:
      - sean-smith-test

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: checkout code
        uses: actions/checkout@v4
      - name: Setup app token
        uses: wwsean08/github-app-token@v2
        with:
          app_id: ${{ secrets.APP_READ_ALL_REPOS_ID }}
          private_key: ${{ secrets.APP_READ_ALL_REPOS_KEY_B64 }}
      - name: Sleep for about an hour
        run: sleep 61m

Screenshot 2024-04-01 at 3 39 47 PM

Revoking as it's not expired

name: Testing app rejection update
on:
  push:
    branches:
      - sean-smith-test

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: checkout code
        uses: actions/checkout@v4
      - name: Setup app token
        uses: wwsean08/github-app-token@v2
        with:
          app_id: ${{ secrets.APP_READ_ALL_REPOS_ID }}
          private_key: ${{ secrets.APP_READ_ALL_REPOS_KEY_B64 }}
      - name: Sleep for about an hour
        run: sleep 5

Screenshot 2024-04-01 at 3 41 06 PM

@wwsean08 wwsean08 changed the title WIP: fix: Don't try to revoke a token that has already expired fix: Don't try to revoke a token that has already expired Apr 1, 2024
@PoltoS
Copy link

PoltoS commented Jul 2, 2025

Closes #111

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy