Skip to content

fix(reconcile): made cross repo more robust #47

New issue

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

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

Already on GitHub? # to your account

Merged
merged 6 commits into from
Sep 26, 2023
Merged

Conversation

reitwiec
Copy link
Collaborator

@reitwiec reitwiec commented Sep 26, 2023

In the scenario where we are reconciling between repositories, we now automatically raise a PR in the target repository with the replicated source branch. Hence improving the UX.
In-order to achieve the above, we have to make sure that the ownerName and repositoryName provided in the command is that of the target repository, so that after replicating the source to the target repository, we can reconcile between the source replica and target branch in the target branch repository.

@reitwiec reitwiec marked this pull request as draft September 26, 2023 12:33
failOnError(
c.PersistentFlags().MarkDeprecated("repo", `please use "repository" flag instead.`),
"reconcile",
)
c.PersistentFlags().StringVar(&repositoryName, "repository", "", "The name of the gihtub repository.")
c.PersistentFlags().StringVar(&repositoryName, "repository", "", "The name of the TARGET github repository.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you not need the repository of the source branch at all?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope. It should always be the repository of the target branch. In the case where the branches belong to different repositories, it will be automatically handled by the remotes we provide.

@reitwiec reitwiec marked this pull request as ready for review September 26, 2023 13:04
@blackhatcrazy blackhatcrazy merged commit 49305e6 into v2 Sep 26, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants