Skip to content

Remove automatic_github_packages_auth feature flag#1699

Open
JamieMagee wants to merge 1 commit into
github:mainfrom
JamieMagee:jamiemagee/remove-github-packages-auth-feature-flag
Open

Remove automatic_github_packages_auth feature flag#1699
JamieMagee wants to merge 1 commit into
github:mainfrom
JamieMagee:jamiemagee/remove-github-packages-auth-feature-flag

Conversation

@JamieMagee
Copy link
Copy Markdown
Contributor

No description provided.

@JamieMagee JamieMagee requested a review from a team as a code owner May 27, 2026 21:21
Copilot AI review requested due to automatic review settings May 27, 2026 21:21
Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

This PR removes the experiment-flag gate for creating GitHub Packages credentials, making credential creation depend only on GITHUB_TOKEN presence and supported package managers.

Changes:

  • Removed the automatic_github_packages_auth experiment/flag check in getPackagesCredential.
  • Updated unit tests to stop setting experiment flags for package auth scenarios.
  • Regenerated/updated the bundled dist/main/index.js artifact.
Show a summary per file
File Description
src/main.ts Removes experiment gating so packages credentials can be created without an “automatic auth” experiment flag.
dist/main/index.js Updates compiled bundle consistent with the getPackagesCredential behavior change (plus large formatting churn).
tests/main.test.ts Adjusts tests to no longer rely on experiment flags when expecting credentials to be created.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/4 changed files
  • Comments generated: 3

Comment thread src/main.ts
Comment on lines 219 to 222
): Credential | null {
const experiments =
(jobDetails?.experiments as {[key: string]: boolean}) || {}
const experimentName = 'automatic_github_packages_auth'
const alternateExperimentName = experimentName.replace(/_/g, '-')
const autoAuthWithPackages =
experiments[experimentName] ?? experiments[alternateExperimentName] ?? false
if (!autoAuthWithPackages) {
return null
}

const githubToken = process.env.GITHUB_TOKEN
if (!githubToken) {
core.warning(
Comment thread __tests__/main.test.ts
Comment on lines 1152 to 1157
describe('when automatic package auth is disabled', () => {
it('returns null', () => {
const details = createJobDetails('nuget', {[experimentName]: false})
const details = createJobDetails('nuget', {})
const cred = getPackagesCredential(details, 'test-actor')
expect(cred).toBeNull()
})
Comment thread __tests__/main.test.ts
Comment on lines 1181 to 1184
it('creates a GitHub packages credential with alternate experiment name', () => {
const details = createJobDetails('nuget', {
[alternateExperimentName]: true
})
const details = createJobDetails('nuget', {})
const cred = getPackagesCredential(details, 'test-actor')
expect(cred).toEqual({
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants