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

Modify default branch behaviour for git repos #634

Conversation

qu1queee
Copy link
Contributor

@qu1queee qu1queee commented Mar 2, 2021

Changes

The behaviour for a git repo revision was being hardcoded to master,
which is incorrect, while github is already creating the default branch
to main and also because the default Tekton behaviour was not taking
place if the revision parameter is not specified.

Tekton defaults behaviour triggers a git symbolic-link to HEAD, which
we should allow to happen if the user does not specify a revision in the
Build source.

Fixes #518

Tekton introduced the default behaviour in tektoncd/pipeline@9aff0a0

Submitter Checklist

  • [x ] Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • [x ] Set a kind label on this PR
  • [x ] Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Ensure default branch of repositories falls to HEAD when revision is not specified in the Build

@openshift-ci-robot openshift-ci-robot added the release-note Label for when a PR has specified a release note label Mar 2, 2021
@qu1queee qu1queee changed the title Fixes #518 Modify default branch behaviour for git repos Mar 2, 2021
@gabemontero
Copy link
Member

hmmm ... the requiring of setting kind label on PRs does not seem taking hold

@adambkaplan we might need to revisit opnshift/release repo and see if something got changed on us

@gabemontero
Copy link
Member

/approve

@qu1queee should we give some hint of this in https:/shipwright-io/build/blob/master/docs/build.md#defining-the-source and the text explaining source.revision ?

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gabemontero

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 2, 2021
@qu1queee
Copy link
Contributor Author

qu1queee commented Mar 2, 2021

@gabemontero totally, let me do this

The behaviour for a git repo revision was being hardcoded to `master`,
which is incorrect, while github is already creating the default branch
to `main` and also because the default Tekton behaviour does not take
place if the revision parameter is not specified.

Tekton defaults behaviour triggers a git symbolic-link to HEAD, which
we should allow to happen if the user does not specify a revision in the
Build source.
@qu1queee qu1queee force-pushed the qu1queee/default_git_branch_fix branch from fe99340 to af7d73f Compare March 2, 2021 17:51
@gabemontero
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 2, 2021
@openshift-merge-robot openshift-merge-robot merged commit 0980094 into shipwright-io:master Mar 2, 2021
@qu1queee qu1queee deleted the qu1queee/default_git_branch_fix branch March 2, 2021 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify spec.source default branch from master to main
4 participants