context.runAttempt is undefined using github-script v7
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- github-actions, typescript
- Ambito
- devops
Direzione di ricerca
Start by comparing the README.md reference with the @actions/github version used by github-script v7, then inspect actions/toolkit's packages/github/src/context.ts and the published package metadata. Reproduce the workflow shown in the issue and confirm that context.runAttempt returns the run attempt value rather than undefined.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Attempting to access GITHUB_RUN_ATTEMPT using context.runAttempt gives back undefined
To Reproduce
Steps to reproduce the behavior:
Create following test workflow and run it
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/github-script@v7
with:
script: |
const runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
core.warning(`context.runAttempt content: ${context.runAttempt} - ${runAttempt}`);
Result in:
Warning: context.runAttempt content: undefined - 1
Expected behavior
context.runAttempt should hold the correct value according to the link https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts used in README.md
After looking at the actions/toolkit repository i wonder if the version linked was actually released at all, the actions/toolkit repo don't have any tags for @actions/github-6.0.0 and the release in npmjs date back to 10/10/2023 while the commit adding runAttempt date 28/10/2023 ..
- Lingua principale
- TypeScript
- Stelle
- 5k
- Fork
- 586
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/github-script
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
actions/github-script#728 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
actions/github-script#727 · 1 reazione ·
-
{ Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
actions/github-script#724 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
actions/github-script#723 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
actions/github-script#714 · 1 commento · 4 reazioni ·
Tutte le issue di actions/github-script
Issue simili
-
blocklist removal
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
pastelsky/bundlephobia#1122 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100