Skip to content
This repository has been 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

Closed
mojavelinux opened this issue Apr 11, 2016 · 2 comments
Closed
Milestone

Comments

@mojavelinux
Copy link
Contributor

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')
@ajoberstar ajoberstar added this to the 1.5.0 milestone Apr 12, 2016
@ajoberstar
Copy link
Owner

Also makes sense.

@mojavelinux
Copy link
Contributor Author

👍

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

2 participants