Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test-only GitRepoLinks create command #7735

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kmcnellis
Copy link
Member

@kmcnellis kmcnellis commented Sep 26, 2024

Description

Add a new command for testing, that allows creation of a new gitRepoLink, with a configurable connection ID. This allows us to test the flow for creating a DevConnect repo & test changing the linked repo via the REST api.

Mostly just moves around existing code in src/apphosting/githubConnections.ts, and allows for passing & testing a new parameter for the connection ID.

Scenarios Tested

Tested creating a backend to ensure it still works, and tested the new command

Sample Commands

firebase experiments:enable internaltesting

firebase apphosting:repos:create --project=kiana-firestack-bash --gitconnection=test-connection

firebase apphosting:repos:create --project=kiana-firestack-bash

src/apphosting/githubConnections.ts Outdated Show resolved Hide resolved
src/apphosting/githubConnections.ts Outdated Show resolved Hide resolved
src/apphosting/githubConnections.ts Outdated Show resolved Hide resolved
src/apphosting/githubConnections.ts Show resolved Hide resolved
src/apphosting/githubConnections.ts Outdated Show resolved Hide resolved
@kmcnellis kmcnellis force-pushed the kianam-createconnection branch 2 times, most recently from 0cc2013 to 819a8fd Compare September 27, 2024 17:22
@kmcnellis kmcnellis enabled auto-merge (squash) September 30, 2024 16:04
src/apphosting/githubConnections.ts Outdated Show resolved Hide resolved
utils.logBullet(clc.bold(`${clc.yellow("===")} Import a GitHub repository`));

if (createConnectionId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

would be great to add a unittest for this

src/apphosting/githubConnections.ts Outdated Show resolved Hide resolved
src/commands/apphosting-repos-create.ts Show resolved Hide resolved
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