-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH Allow developers to declare which packages are inaccessible.
This provides a common configuration point for modules which provide additional functionality to the maintenance report that may attempt to access private and otherwise inaccessible repositories.
- Loading branch information
1 parent
24bd9c6
commit ae22cd9
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,25 @@ newer releases don't show up as expected. We recommend to have looser constraint | |
(e.g. `silverstripe/framework:^4.3`). When the "Latest" version shows `dev-master`, | ||
it likely means that you have `"minimum-stability": "dev"` in your `composer.json`. | ||
|
||
## Private repositories | ||
|
||
While this module itself doesn't fetch information about repositories, other modules (such as the [update-checker](https://github.com/bringyourownideas/silverstripe-composer-update-checker)) do. If you have private repositories for which you are unable to provide authentication details to the respective module, you should mark those repositories as inaccessible. | ||
|
||
This can be done either per repository: | ||
```yml | ||
BringYourOwnIdeas\Maintenance\Tasks: | ||
inaccessible_packages: | ||
- some-org/some-package-name | ||
``` | ||
or for situations where you are hosting repositories yourself, per host: | ||
```yml | ||
BringYourOwnIdeas\Maintenance\Tasks: | ||
inaccessible_repository_hosts: | ||
- gitea.mycompany.com | ||
``` | ||
This catches packages whether they're referenced by https or ssh URLs - for example, for `https://gitea.mycompany.com/some-org/some-package-name.git` and for `[email protected]:some-org/some-package-name.git`, the value should be `gitea.mycompany.com`. | ||
|
||
## Documentation | ||
|
||
Please see the [user guide](docs/en/userguide/index.md) section. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,29 @@ class UpdatePackageInfoTask extends BuildTask | |
'silverstripe-vendormodule', | ||
]; | ||
|
||
/** | ||
* A list of package names which composer will not be able to access | ||
* e.g. private packages for which you aren't allowed to provide credentials. | ||
* | ||
* @config | ||
* @var array | ||
*/ | ||
private static $inaccessible_packages = []; | ||
|
||
/** | ||
* A list of repository hosts which composer will not be able to access | ||
* e.g. private repository hosts for which you aren't allowed to provide credentials. | ||
* | ||
* This works for https AND ssh URLs - for example, for | ||
* `https://gitea.mycompany.com/some-org/some-repository.git` and for | ||
* `[email protected]:some-org/some-repository.git`, the value should be | ||
* `gitea.mycompany.com` | ||
* | ||
* @config | ||
* @var array | ||
*/ | ||
private static $inaccessible_repository_hosts = []; | ||
|
||
/** | ||
* @var ComposerLoader | ||
*/ | ||
|