René's URL Explorer Experiment


Title: feat: add script-file input for lint-friendly external JS scripts by osher · Pull Request #715 · actions/github-script · GitHub

Open Graph Title: feat: add script-file input for lint-friendly external JS scripts by osher · Pull Request #715 · actions/github-script

X Title: feat: add script-file input for lint-friendly external JS scripts by osher · Pull Request #715 · actions/github-script

Description: Closes #714 Problem Inline script is a YAML string — invisible to linters and IDEs. The common workaround was wrapping a require call inside the inline script, which still needs boilerplate and assumes a path convention. The current solution requires some ugly scaffolding. We can improve DevX and provide the scaffold as a part of the service :) Solution New optional script-file input that accepts a path to a JS file. The file module.exports an function (potentially async) that is called with the a IoC dependency bag with everything in-line scripts experience (github, octokit, getOctokit, context, core, exec, glob, io, require). - uses: actions/checkout@v4 - uses: actions/github-script@v9 with: script-file: .github/scripts/my-script.js script and script-file are mutually exclusive — exactly one must be provided. Relative paths resolve against $GITHUB_WORKSPACE; absolute paths are used as-is. Changes action.yml — adds script-file input; makes script optional src/script-file.ts — path resolution and script loading logic src/args.ts — AsyncFunctionArguments extracted from async-function.ts so neither execution path depends on the other src/main.ts — mutual-exclusion validation; dispatches to the right execution path types/non-webpack-require.ts — corrects __non_webpack_require__ type from deprecated NodeRequire / wrong NodeJS.RequireResolve to NodeJS.Require __test__/script-file.test.ts — 10 tests covering path resolution, arg forwarding, error cases README.md — new ## Script file section with usage, IoC bag table, path resolution rules .github/fixtures/script-file/ — fixture JS files for integration tests .github/workflows/integration.yml — 10 new integration test jobs: happy path (relative path, absolute path, all IoC args, json/string encoding, require-in-file) and error cases (both inputs set, neither set, nonexistent file, non-function export, file:// protocol)

Open Graph Description: Closes #714 Problem Inline script is a YAML string — invisible to linters and IDEs. The common workaround was wrapping a require call inside the inline script, which still needs boilerplate and ass...

X Description: Closes #714 Problem Inline script is a YAML string — invisible to linters and IDEs. The common workaround was wrapping a require call inside the inline script, which still needs boilerplate and ass...

Opengraph URL: https://github.com/actions/github-script/pull/715

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:03f18a41-84da-c99a-fd40-89bbc38989af
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDF24:62F48:29F20F:3795DE:6B01BFB1
html-safe-nonce4239294e2c5e9010848e9c6ce79fdedad49810f81fbc204f0a65fe78fec8ec59
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjI0OjYyRjQ4OjI5RjIwRjozNzk1REU6NkIwMUJGQjEiLCJ2aXNpdG9yX2lkIjoiMTA5MjM4OTA3OTE0NTg4OTcxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace5f20c397dee5f2222b7d7850c1fa9816a3919623e4c3fc2842941dce64af83d
hovercard-subject-tagpull_request:3583966712
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,actions,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/actions/github-script/pull/715/files
twitter:imagehttps://avatars.githubusercontent.com/u/803101?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/803101?s=400&v=4
og:image:altCloses #714 Problem Inline script is a YAML string — invisible to linters and IDEs. The common workaround was wrapping a require call inside the inline script, which still needs boilerplate and ass...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/actions/github-script git https://github.com/actions/github-script.git
octolytics-dimension-user_id44036562
octolytics-dimension-user_loginactions
octolytics-dimension-repository_id205262760
octolytics-dimension-repository_nwoactions/github-script
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id205262760
octolytics-dimension-repository_network_root_nwoactions/github-script
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/actions/github-script/pull/715/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Factions%2Fgithub-script%2Fpull%2F715%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Factions%2Fgithub-script%2Fpull%2F715%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=actions%2Fgithub-script
Reloadhttps://github.com/actions/github-script/pull/715/files
Reloadhttps://github.com/actions/github-script/pull/715/files
Reloadhttps://github.com/actions/github-script/pull/715/files
actionshttps://github.com/actions
github-scripthttps://github.com/actions/github-script
Codehttps://github.com/actions/github-script
Issues60 (60)https://github.com/actions/github-script/issues
Pull requests36 (36)https://github.com/actions/github-script/pulls
Discussionshttps://github.com/actions/github-script/discussions
Actionshttps://github.com/actions/github-script/actions
Security and qualityhttps://github.com/actions/github-script/security
Insightshttps://github.com/actions/github-script/insights
Sign up for GitHub https://github.com/signup?return_to=%2Factions%2Fgithub-script%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Factions%2Fgithub-script%2Fissues%2Fnew%2Fchoose
osherhttps://github.com/osher
actions:mainhttps://github.com/actions/github-script/tree/main
osher:feat/script-filehttps://github.com/osher/github-script/tree/feat/script-file
Conversation 2 https://github.com/actions/github-script/pull/715
Commits 1 https://github.com/actions/github-script/pull/715/commits
Checks 0 https://github.com/actions/github-script/pull/715/checks
Files changed https://github.com/actions/github-script/pull/715/files
Please reload this pagehttps://github.com/actions/github-script/pull/715/files
feat: add script-file input for lint-friendly external JS scripts https://github.com/actions/github-script/pull/715/files#top
Show all changes 1 commit https://github.com/actions/github-script/pull/715/files
67c280d feat: add script-file input for lint-friendly external JS scripts osher Apr 25, 2026 https://github.com/actions/github-script/pull/715/commits/67c280d263192cbe86562282f6203309e110eb09
Clear filters https://github.com/actions/github-script/pull/715/files
Please reload this pagehttps://github.com/actions/github-script/pull/715/files
Please reload this pagehttps://github.com/actions/github-script/pull/715/files
all-args.js https://github.com/actions/github-script/pull/715/files#diff-14f06dfe0a0894510d9855e218030fde462b4ab02abecec85142ce02551f40cb
basic.js https://github.com/actions/github-script/pull/715/files#diff-c565b480c72d62128fd212daa666046879ad72a0330f2be9d2fd21331998ff94
json-return.js https://github.com/actions/github-script/pull/715/files#diff-7a4d8a95f65aa379c8e024a95d1d0c81235804453118acdf0061a6b5e5cb00f9
not-a-function.js https://github.com/actions/github-script/pull/715/files#diff-7628a27910cae7279a06468185bce3acade79438b23a3788f4d554ac80c63be5
sibling-caller.js https://github.com/actions/github-script/pull/715/files#diff-ee1cea3d2a3948e8c711cb2fd604034911fec5c3aa35463c9c5d6fdf0631f503
sibling-module.js https://github.com/actions/github-script/pull/715/files#diff-755079aa84781f2971d7485817d059cb7772344529d4e22df1ccd9160bf405f5
integration.yml https://github.com/actions/github-script/pull/715/files#diff-82454b2fc887e9985b9348b8f3bca03d2f839645a4c3ba1f3f850014d7da5c8b
README.md https://github.com/actions/github-script/pull/715/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
script-file.test.ts https://github.com/actions/github-script/pull/715/files#diff-b771f882966d01ab8d08c0fa08eb54e7af534733771b0863ca8771aabe0722cf
action.yml https://github.com/actions/github-script/pull/715/files#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6
index.js https://github.com/actions/github-script/pull/715/files#diff-3d2b59189eeedc2d428ddd632e97658fe310f587f7cb63b01f9b98ffc11c0197
args.ts https://github.com/actions/github-script/pull/715/files#diff-f15b8e97bcfc645f8a5c25ac00512ae33cc1fb1e338fc9c079a1822e560a59dc
async-function.ts https://github.com/actions/github-script/pull/715/files#diff-dbb29757fc1d2f7daeae34c0c584b90ad4645833e4617e7082762abb2c7724c4
main.ts https://github.com/actions/github-script/pull/715/files#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3d
script-file.ts https://github.com/actions/github-script/pull/715/files#diff-ab5d1b63003e4e9eb88eefc14dc7f6cee8ff21e7345fa5906bcaafc01c7ba981
args.d.ts https://github.com/actions/github-script/pull/715/files#diff-46868f6aea3da187cd5fa3387693ab7e0ec3311b0d7108134fbba9cfe68aa268
async-function.d.ts https://github.com/actions/github-script/pull/715/files#diff-4bec391c0425c5342258d89eb5eaf4414c0b0d9b2f4a6e39fec90c90b781730d
non-webpack-require.ts https://github.com/actions/github-script/pull/715/files#diff-964e4ddc37b069327613d8314b171cebe3ba42a8c95e3e88e41384aa206e93ed
https://github.com/actions/github-script/blob/main/CODEOWNERS#L1
.github/fixtures/script-file/all-args.jshttps://github.com/actions/github-script/pull/715/files#diff-14f06dfe0a0894510d9855e218030fde462b4ab02abecec85142ce02551f40cb
View file https://github.com/actions/github-script/blob/67c280d263192cbe86562282f6203309e110eb09/.github/fixtures/script-file/all-args.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/actions/github-script/pull/715/{{ revealButtonHref }}
https://github.com/actions/github-script/blob/main/CODEOWNERS#L1
.github/fixtures/script-file/basic.jshttps://github.com/actions/github-script/pull/715/files#diff-c565b480c72d62128fd212daa666046879ad72a0330f2be9d2fd21331998ff94
View file https://github.com/actions/github-script/blob/67c280d263192cbe86562282f6203309e110eb09/.github/fixtures/script-file/basic.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/actions/github-script/pull/715/{{ revealButtonHref }}
https://github.com/actions/github-script/blob/main/CODEOWNERS#L1
.github/fixtures/script-file/json-return.jshttps://github.com/actions/github-script/pull/715/files#diff-7a4d8a95f65aa379c8e024a95d1d0c81235804453118acdf0061a6b5e5cb00f9
View file https://github.com/actions/github-script/blob/67c280d263192cbe86562282f6203309e110eb09/.github/fixtures/script-file/json-return.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/actions/github-script/pull/715/{{ revealButtonHref }}
https://github.com/actions/github-script/blob/main/CODEOWNERS#L1
.github/fixtures/script-file/not-a-function.jshttps://github.com/actions/github-script/pull/715/files#diff-7628a27910cae7279a06468185bce3acade79438b23a3788f4d554ac80c63be5
View file https://github.com/actions/github-script/blob/67c280d263192cbe86562282f6203309e110eb09/.github/fixtures/script-file/not-a-function.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/actions/github-script/pull/715/{{ revealButtonHref }}
https://github.com/actions/github-script/blob/main/CODEOWNERS#L1
.github/fixtures/script-file/sibling-caller.jshttps://github.com/actions/github-script/pull/715/files#diff-ee1cea3d2a3948e8c711cb2fd604034911fec5c3aa35463c9c5d6fdf0631f503
View file https://github.com/actions/github-script/blob/67c280d263192cbe86562282f6203309e110eb09/.github/fixtures/script-file/sibling-caller.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/actions/github-script/pull/715/{{ revealButtonHref }}
https://github.com/actions/github-script/blob/main/CODEOWNERS#L1
.github/fixtures/script-file/sibling-module.jshttps://github.com/actions/github-script/pull/715/files#diff-755079aa84781f2971d7485817d059cb7772344529d4e22df1ccd9160bf405f5
View file https://github.com/actions/github-script/blob/67c280d263192cbe86562282f6203309e110eb09/.github/fixtures/script-file/sibling-module.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/actions/github-script/pull/715/{{ revealButtonHref }}
https://github.com/actions/github-script/blob/main/CODEOWNERS#L1
.github/workflows/integration.ymlhttps://github.com/actions/github-script/pull/715/files#diff-82454b2fc887e9985b9348b8f3bca03d2f839645a4c3ba1f3f850014d7da5c8b
View file https://github.com/actions/github-script/blob/67c280d263192cbe86562282f6203309e110eb09/.github/workflows/integration.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/actions/github-script/pull/715/{{ revealButtonHref }}
https://github.com/actions/github-script/pull/715/files#diff-82454b2fc887e9985b9348b8f3bca03d2f839645a4c3ba1f3f850014d7da5c8b
https://github.com/actions/github-script/blob/main/CODEOWNERS#L1
README.mdhttps://github.com/actions/github-script/pull/715/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
View file https://github.com/actions/github-script/blob/67c280d263192cbe86562282f6203309e110eb09/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/actions/github-script/pull/715/{{ revealButtonHref }}
https://github.com/actions/github-script/pull/715/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/actions/github-script/pull/715/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/actions/github-script/pull/715/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/actions/github-script/pull/715/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/actions/github-script/pull/715/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/actions/github-script/pull/715/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
https://github.com/actions/github-script/pull/715/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
Please reload this pagehttps://github.com/actions/github-script/pull/715/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.