Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Default branches other than master ar not supported #423

@tomalec

Description

@tomalec

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions