Skip to content

feat(create-token): log workflow ref before token fetch when debug on - #904

Merged
fr4nc1sc0-r4m0n merged 4 commits into
mainfrom
feat/print-workflow-ref-create-token
Apr 22, 2026
Merged

fr4nc1sc0-r4m0n merged 4 commits into
mainfrom
feat/print-workflow-ref-create-token

Conversation

@fr4nc1sc0-r4m0n

Copy link
Copy Markdown
Contributor

Summary

  • Add a composite step in github/create-token that echoes github.workflow_ref when step debug logging is enabled (runner.debug == '1', e.g. ACTIONS_STEP_DEBUG).
  • Run that step before elastic/ci-gh-actions/fetch-github-token so workflow context is visible without depending on the fetched token.

Validation

  • YAML structure reviewed locally; step uses standard github / runner contexts and composite if / shell: bash.

Risks / Known Gaps

  • None expected; no change to token retrieval when debug is off.

Related issue: https://github.com/elastic/observability-robots/issues/3239

Print github.workflow_ref only when runner.debug is set (e.g. ACTIONS_STEP_DEBUG), before calling fetch-github-token.

Made-with: Cursor
@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n requested a review from a team as a code owner April 17, 2026 10:19
@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n self-assigned this Apr 17, 2026
Copilot AI review requested due to automatic review settings April 17, 2026 10:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds debug-only logging to the github/create-token composite action so the workflow reference is visible in logs before the token fetch step runs, helping troubleshoot token-related failures without depending on the fetched token.

Changes:

  • Add a new composite step that prints github.workflow_ref only when step debug logging is enabled (runner.debug == '1').
  • Ensure the debug print runs before elastic/ci-gh-actions/fetch-github-token.

Align with the rate-limit debug step: avoid shell: bash on Windows runners without Git Bash.

Made-with: Cursor
@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n added the changelog:chore When you add a change that is not user-facing label Apr 17, 2026
Comment thread github/create-token/action.yml Outdated

@v1v v1v left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can enable it by default, by the way there is no windows support in the upstream:

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Copilot AI review requested due to automatic review settings April 17, 2026 10:31
Comment thread github/create-token/action.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread github/create-token/action.yml
@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n added this pull request to the merge queue Apr 17, 2026
github-merge-queue Bot pushed a commit that referenced this pull request Apr 17, 2026
…#904)

* feat(create-token): log workflow ref before token fetch when debug on

Print github.workflow_ref only when runner.debug is set (e.g. ACTIONS_STEP_DEBUG), before calling fetch-github-token.

Made-with: Cursor

* fix(create-token): skip workflow-ref debug echo on Windows

Align with the rate-limit debug step: avoid shell: bash on Windows runners without Git Bash.

Made-with: Cursor

* Update github/create-token/action.yml

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>

* Apply suggestion from @fr4nc1sc0-r4m0n

---------

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 17, 2026
@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n added this pull request to the merge queue Apr 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 17, 2026
@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n added this pull request to the merge queue Apr 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Apr 21, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n added this pull request to the merge queue Apr 22, 2026
Merged via the queue into main with commit cbad613 Apr 22, 2026
6 checks passed
@fr4nc1sc0-r4m0n
fr4nc1sc0-r4m0n deleted the feat/print-workflow-ref-create-token branch April 22, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:chore When you add a change that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants