repository-provider
Advanced tools
Comparing version 2.11.1 to 2.12.0
@@ -70,2 +70,20 @@ 'use strict'; | ||
/** | ||
* Deliver repository and branch name combined | ||
* @return {string} 'repoUrl#branch' | ||
*/ | ||
get url() { | ||
return this.isDefault | ||
? this.repository.url | ||
: `${this.repository.url}#${this.name}`; | ||
} | ||
/** | ||
* Are we the default branch | ||
* @return {boolean} name is 'master' | ||
*/ | ||
get isDefault() { | ||
return this.name === 'master'; | ||
} | ||
/** | ||
* Delete the branch from the {@link Repository}. | ||
@@ -176,2 +194,10 @@ * @see {@link Repository#deleteBranch} | ||
/** | ||
* Deliver preffered url to access the repo | ||
* @return {string} | ||
*/ | ||
get url() { | ||
return this.urls[0]; | ||
} | ||
/** | ||
* Repository owner | ||
@@ -178,0 +204,0 @@ * Default implementation delivers undefined |
{ | ||
"name": "repository-provider", | ||
"version": "2.11.1", | ||
"version": "2.12.0", | ||
"main": "dist/repository-provider.js", | ||
@@ -5,0 +5,0 @@ "module": "src/repository-provider.js", |
@@ -63,2 +63,4 @@ [![npm](https://img.shields.io/npm/v/repository-provider.svg)](https://www.npmjs.com/package/repository-provider) | ||
- [fullName](#fullname) | ||
- [url](#url) | ||
- [isDefault](#isdefault) | ||
- [delete](#delete) | ||
@@ -75,2 +77,3 @@ - [content](#content-1) | ||
- [urls](#urls) | ||
- [url](#url-1) | ||
- [owner](#owner-1) | ||
@@ -268,2 +271,14 @@ - [project](#project-1) | ||
### url | ||
Deliver repository and branch name combined | ||
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 'repoUrl#branch' | ||
### isDefault | ||
Are we the default branch | ||
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** name is 'master' | ||
### delete | ||
@@ -370,2 +385,8 @@ | ||
### url | ||
Deliver preffered url to access the repo | ||
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
### owner | ||
@@ -372,0 +393,0 @@ |
@@ -64,2 +64,20 @@ import { notImplementedError } from './util'; | ||
/** | ||
* Deliver repository and branch name combined | ||
* @return {string} 'repoUrl#branch' | ||
*/ | ||
get url() { | ||
return this.isDefault | ||
? this.repository.url | ||
: `${this.repository.url}#${this.name}`; | ||
} | ||
/** | ||
* Are we the default branch | ||
* @return {boolean} name is 'master' | ||
*/ | ||
get isDefault() { | ||
return this.name === 'master'; | ||
} | ||
/** | ||
* Delete the branch from the {@link Repository}. | ||
@@ -66,0 +84,0 @@ * @see {@link Repository#deleteBranch} |
@@ -45,2 +45,10 @@ import { notImplementedError } from './util'; | ||
/** | ||
* Deliver preffered url to access the repo | ||
* @return {string} | ||
*/ | ||
get url() { | ||
return this.urls[0]; | ||
} | ||
/** | ||
* Repository owner | ||
@@ -47,0 +55,0 @@ * Default implementation delivers undefined |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46569
995
557