Remove automatic_github_packages_auth feature flag#1699
Open
JamieMagee wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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_authexperiment/flag check ingetPackagesCredential. - Updated unit tests to stop setting experiment flags for package auth scenarios.
- Regenerated/updated the bundled
dist/main/index.jsartifact.
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 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 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 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({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.