Skip to content
This repository was archived by the owner on Oct 5, 2018. It is now read-only.
This repository was archived by the owner on Oct 5, 2018. It is now read-only.

Use current git repository as the default for github-pages plugin #172

@mojavelinux

Description

@mojavelinux

Right now, it's necessary to specify the repoUri explicitly. In most cases, however, the git repository for GitHub Pages is the same as the repository for the project. Therefore, it would be very convenient if the repoUri was set to the git property remote.origin.url by default.

Since there's currently no default, this change shouldn't break any existing users.

The behavior I'm describing is how the gh-pages npm package, commonly used in Gulp builds. (See https://www.npmjs.com/package/gh-pages#optionsrepo).

In the meantime, I found a workaround using JGit directly. But it's not very elegant.

repoUri = new org.eclipse.jgit.lib.RepositoryBuilder()
      .readEnvironment().findGitDir(file('.')).build()
      .getConfig().getString('remote', 'origin', 'url')

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions