diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a6e92a29..48a45d268 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -185,4 +185,19 @@ The same process is followed whether the contributor is external or another `dbt Once all tests are passing and the PR has been approved by the appropriate code owners, a `dbt-adapters` maintainer will merge the changes into `main`. +### Migrating an existing pull request into the monorepo + +You may have opened your pull request against an adapter prior to its migration into the monorepo. +In that case, you'll need to migrate that pull request into this repo. +Unfortunately, GitHub does not allow you to migrate a pull request; however, you can migrate your branch. +Here are the steps to do that: + +1. Fork this repository if you haven't already and pull it down locally +2. Run the script `./scripts/migrate-branch.sh` (replacing the args with your versions): + ```shell + source ./scripts/migrate-branch.sh dbt-labs dbt-postgres my-cool-feature-branch + ``` +3. Push your new feature branch back up to your fork of this repository +4. Open up a new pull request into `dbt-adapters` from your fork + And that's it! Happy developing :tada: diff --git a/scripts/migrate-branch.sh b/scripts/migrate-branch.sh index ade2ab178..a29ae85ce 100644 --- a/scripts/migrate-branch.sh +++ b/scripts/migrate-branch.sh @@ -1,10 +1,10 @@ # 1. Run this script to migrate your feature branch from an adapter repo/fork to the dbt-adapters repo/fork, e.g.: -# $> source ./scripts/migrate-branch.sh dbt-labs dbt-postgres my-cool-feature-branch +# > source ./scripts/migrate-branch.sh dbt-labs dbt-postgres my-cool-feature-branch # 2. Resolve any conflicts resulting from the rebase and re-run. # 3. Push the resulting branch back up to the dbt-adapters repo/fork, e.g.: -# $> git push origin dbt-postgres/my-cool-feature-branch +# > git push origin dbt-postgres/my-cool-feature-branch # 4. Once everything migrates successfully, remove the remote, e.g.: -# $> git remote remove adapter +# > git remote remove adapter user=$1 # your github user (e.g. dbt-labs) repo=$2 # the repo name (e.g. dbt-postgres)