Skip to content

Use built-in core object in github-script example#43031

Open
ryohighbridge wants to merge 1 commit intogithub:mainfrom
ryohighbridge:fix-github-script-core-usage
Open

Use built-in core object in github-script example#43031
ryohighbridge wants to merge 1 commit intogithub:mainfrom
ryohighbridge:fix-github-script-core-usage

Conversation

@ryohighbridge
Copy link

Replace manual require of @actions/core with the built-in core object that is automatically available in github-script action. This provides a cleaner and more straightforward approach.

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

Why:

Closes:

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

Replace manual require of @actions/core with the built-in core object
that is automatically available in github-script action. This provides
a cleaner and more straightforward approach.

Reference: https://github.com/actions/github-script?tab=readme-ov-file#this-action
Copilot AI review requested due to automatic review settings February 19, 2026 01:34
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Feb 19, 2026
@github-actions
Copy link
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-cloud-providers.md fpt
ghec
ghes@ 3.19 3.18 3.17 3.16 3.15 3.14
fpt
ghec
ghes@ 3.19 3.18 3.17 3.16 3.15 3.14

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request simplifies a github-script example in the OIDC documentation by removing the manual require of @actions/core and using the built-in core object that is automatically available in the github-script action environment.

Changes:

  • Removed the manual require('@actions/core') statement and the coredemo variable
  • Updated code to use the built-in core object directly for getIDToken() and setOutput() methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments