Skip to content

fix(.github/workflows): upgrade github-script to v9 in community-label job#24479

Merged
jdomeracki-coder merged 1 commit intomainfrom
fix-contrib-workflow-require
Apr 17, 2026
Merged

fix(.github/workflows): upgrade github-script to v9 in community-label job#24479
jdomeracki-coder merged 1 commit intomainfrom
fix-contrib-workflow-require

Conversation

@jdomeracki-coder
Copy link
Copy Markdown
Contributor

The community-label job in the contrib workflow fails with:

Error: Cannot find module '@actions/github'

require("@actions/github") does not work inside the bundled actions/github-script v8 dist — the package is compiled into dist/index.js and is not resolvable by Node's module loader at runtime.

actions/github-script v9 exposes getOctokit as an injected script parameter, so the require call is no longer needed.

Failing run: https://github.com/coder/coder/actions/runs/24566113706/job/71826621724

🤖 Generated by Coder Agents

…l job

The community-label job fails with "Cannot find module @actions/github"
because require("@actions/github") does not work inside the bundled
actions/github-script v8 dist. v9 provides getOctokit as an injected
script parameter, removing the need for the require call.
@jdomeracki-coder
Copy link
Copy Markdown
Contributor Author

getOctokit factory function — Available directly in the script context. Create additional authenticated Octokit clients with different tokens for multi-token workflows, GitHub App tokens, and cross-org access. See Creating additional clients with getOctokit for details and examples.

https://github.com/actions/github-script?tab=readme-ov-file#v9

@jdomeracki-coder jdomeracki-coder marked this pull request as ready for review April 17, 2026 13:18
@jdomeracki-coder jdomeracki-coder requested a review from f0ssel April 17, 2026 13:18
Copy link
Copy Markdown
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

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

Thanks Sir.

@jdomeracki-coder jdomeracki-coder merged commit d8d63ad into main Apr 17, 2026
35 of 36 checks passed
@jdomeracki-coder jdomeracki-coder deleted the fix-contrib-workflow-require branch April 17, 2026 13:39
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 17, 2026
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.

2 participants