Skip to content

Support main branch when fetching Arduino libraries from GitHub #2065

@evgenykochetkov

Description

@evgenykochetkov

When creating a new repository, GitHub suggests calling the default branch main instead of master, and some existing repositories are migrating. We should support both when fetching libraries using #pragma XOD require "link_to_library".

Right now, we have master hardcoded in

// :: URL -> URL
const getGithubArchiveUrl = R.compose(
R.concat(R.__, '/archive/master.zip'),
R.when(R.pipe(R.tail, R.equals('/')), R.init)
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions