mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 15:31:27 +00:00
feat: open repo secrets page in addition to README (#5684)
This commit is contained in:
parent
6ae75c9f32
commit
8d848dca4a
6 changed files with 158 additions and 4 deletions
|
|
@ -18,6 +18,7 @@ vi.mock('../../utils/gitUtils.js', () => ({
|
|||
isGitHubRepository: vi.fn(),
|
||||
getGitRepoRoot: vi.fn(),
|
||||
getLatestGitHubRelease: vi.fn(),
|
||||
getGitHubRepoInfo: vi.fn(),
|
||||
}));
|
||||
|
||||
describe('setupGithubCommand', async () => {
|
||||
|
|
@ -30,7 +31,9 @@ describe('setupGithubCommand', async () => {
|
|||
});
|
||||
|
||||
it('returns a tool action to download github workflows and handles paths', async () => {
|
||||
const fakeRepoRoot = '/github.com/fake/repo/root';
|
||||
const fakeRepoOwner = 'fake';
|
||||
const fakeRepoName = 'repo';
|
||||
const fakeRepoRoot = `/github.com/${fakeRepoOwner}/${fakeRepoName}/root`;
|
||||
const fakeReleaseVersion = 'v1.2.3';
|
||||
|
||||
vi.mocked(gitUtils.isGitHubRepository).mockReturnValueOnce(true);
|
||||
|
|
@ -38,6 +41,10 @@ describe('setupGithubCommand', async () => {
|
|||
vi.mocked(gitUtils.getLatestGitHubRelease).mockResolvedValueOnce(
|
||||
fakeReleaseVersion,
|
||||
);
|
||||
vi.mocked(gitUtils.getGitHubRepoInfo).mockReturnValue({
|
||||
owner: fakeRepoOwner,
|
||||
repo: fakeRepoName,
|
||||
});
|
||||
|
||||
const result = (await setupGithubCommand.action?.(
|
||||
{} as CommandContext,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue