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

Default branches other than master ar not supported #423

Open
tomalec opened this issue Jul 8, 2021 · 0 comments
Open

Default branches other than master ar not supported #423

tomalec opened this issue Jul 8, 2021 · 0 comments

Comments

@tomalec
Copy link

tomalec commented Jul 8, 2021

Do you want to request a feature or report a bug?

Bug

What is the current behavior?
When I run bundlewatch on Travis-CI for a push event, ci-env sets base branch as empty, then bundlewatch uses hardcoded default master, which does not exist in my repo

see https://app.travis-ci.com/github/woocommerce/google-listings-and-ads/jobs/522666112#L14735

[ERROR] Unable to fetch fileDetails for baseBranch=master from https://service.bundlewatch.io/store code=Request failed with status code 404
[INFO] master !== trunk, no results saved
[INFO] Saving results

I explicitly specified the tracked branches in my repo:

 "ci": {
            "trackBranches": ["trunk", "develop"]
        }

If the current behavior is a bug, please provide the steps to reproduce.

  1. Setup bundlewatch for your repo, set custom trackBranches:
	"bundlewatch": {
		"files": [
			{
				"path": "./js/build/*.js",
				"maxSize": "3 kB"
			}
		],
        "ci": {
            "trackBranches": ["trunk", "develop"]
        }
	}
  1. Run on travis script: npm run build && npx bundlewatch

(See our repo's bundlewatch config https://github.com/woocommerce/google-listings-and-ads/blob/trunk/package.json#L94-L120 and the build results https://app.travis-ci.com/github/woocommerce/google-listings-and-ads/jobs/522666112#L14735)

What is the expected behavior?

For a push even, when no CI_BASE_BRANCH is specified, should compare against CI_TARGET_BRANCH or at least respect the branch setup I gave, and use config.ci.trackBranches[0]

If this is a feature request, what is motivation or use case for changing the behavior?

n/a

Please mention other relevant information such as the browser version, Node.js version, bundlewatch version, and Operating System.

tomalec added a commit to woocommerce/google-listings-and-ads that referenced this issue Jul 8, 2021
tomalec added a commit to woocommerce/google-listings-and-ads that referenced this issue Jul 8, 2021
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

No branches or pull requests

1 participant