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 support for a configurable default branch #9

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

mtreinish
Copy link
Member

There has been a recent push to rename the default branch for git
repositories to be something more inclusive than 'master'. Qiskit would
like to make this transition and rename the default branch to 'main'.
However, qiskit-bot has been blocking this transition because it
unconditionally was using 'master' for generating pull requests,
updating local checkouts, etc. To address this and enable us to
transition away from using 'master' for our default branch this commit
adds a new optional per repo configuration option 'default_branch' which
is used to set the default branch for a repository. If not set it
defaults to using master so there is no breaking change for the deployed
bot and we can update the configuration as we rename the branches.
Similarly for the metapackage repository a new optional configuration
option, 'meta_repo_default_branch', is added that behaves the same way
but for the meta_repo.

There has been a recent push to rename the default branch for git
repositories to be something more inclusive than 'master'. Qiskit would
like to make this transition and rename the default branch to 'main'.
However, qiskit-bot has been blocking this transition because it
unconditionally was using 'master' for generating pull requests,
updating local checkouts, etc. To address this and enable us to
transition away from using 'master' for our default branch this commit
adds a new optional per repo configuration option 'default_branch' which
is used to set the default branch for a repository. If not set it
defaults to using master so there is no breaking change for the deployed
bot and we can update the configuration as we rename the branches.
Similarly for the metapackage repository a new optional configuration
option, 'meta_repo_default_branch', is added that behaves the same way
but for the meta_repo.
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Apr 13, 2021
With the pending support being added to qiskit-bot in
Qiskit/qiskit-bot#9 we're able to rename the default branch for the
repository to 'main'. However, when we do that several things will need
to be updated, most importantly the CI trigger was hardcoded to the
previous default branch 'master. This commit fixes these references and
should be merged after we rename the branch to re-enable CI.
Copy link
Member

@levbishop levbishop left a comment

Choose a reason for hiding this comment

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

This LGTM. One could also argue for eventually nhaving the default value of default_branch be main instead, since already github has moved to main for new repos and git itself plans to make that change at some point soon

@mtreinish
Copy link
Member Author

This LGTM. One could also argue for eventually nhaving the default value of default_branch be main instead, since already github has moved to main for new repos and git itself plans to make that change at some point soon

Yeah I think that's fair to do once all of qiskit has migrated to use main instead of master. I'll open an issue to track it.

@mtreinish mtreinish merged commit 5ea3821 into master Apr 16, 2021
@mtreinish mtreinish deleted the default-branch-config branch April 16, 2021 16:23
mtreinish added a commit to Qiskit/qiskit that referenced this pull request Apr 20, 2021
With the pending support being added to qiskit-bot in
Qiskit/qiskit-bot#9 we're able to rename the default branch for the
repository to 'main'. However, when we do that several things will need
to be updated, most importantly the CI trigger was hardcoded to the
previous default branch 'master. This commit fixes these references and
should be merged after we rename the branch to re-enable CI.
mtreinish added a commit to mtreinish/qiskit-aer that referenced this pull request Apr 26, 2021
With the recent support added to qiskit-bot for configurable default
branches in Qiskit/qiskit-bot#9 we're able to rename the default branch
for the repository to 'main'. However, when we do that several things
will need to be updated, most importantly the CI trigger was hardcoded
to the previous default branch 'master. This commit fixes these
references and should be merged after we rename the branch to re-enable
CI.
chriseclectic pushed a commit to Qiskit/qiskit-aer that referenced this pull request Apr 28, 2021
With the recent support added to qiskit-bot for configurable default
branches in Qiskit/qiskit-bot#9 we're able to rename the default branch
for the repository to 'main'. However, when we do that several things
will need to be updated, most importantly the CI trigger was hardcoded
to the previous default branch 'master. This commit fixes these
references and should be merged after we rename the branch to re-enable
CI.
chriseclectic pushed a commit to chriseclectic/qiskit-aer that referenced this pull request Apr 28, 2021
With the recent support added to qiskit-bot for configurable default
branches in Qiskit/qiskit-bot#9 we're able to rename the default branch
for the repository to 'main'. However, when we do that several things
will need to be updated, most importantly the CI trigger was hardcoded
to the previous default branch 'master. This commit fixes these
references and should be merged after we rename the branch to re-enable
CI.
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