add instructions for webhook for #21
This commit is contained in:
parent
f134a8c166
commit
11794c1b81
@ -3,6 +3,7 @@
|
||||
use app\components\Git;
|
||||
use yii\bootstrap\Alert;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
@ -28,7 +29,8 @@ $this->params['breadcrumbs'][] = 'bower.json';
|
||||
|
||||
<p>If you are the mod owner then please add a
|
||||
<code>bower.json</code> file to the
|
||||
<a href="' . Git::getUrl($model->url) . '">repository</a> with the following contents, then click
|
||||
<?= Html::a('repository', Git::getUrl($model->url)) ?>
|
||||
with the following contents, then click
|
||||
<?= Html::a('Update', ['update', 'name' => $model->name]) ?>.
|
||||
</p>
|
||||
|
||||
@ -36,6 +38,46 @@ $this->params['breadcrumbs'][] = 'bower.json';
|
||||
|
||||
<?= $model->getBowerJson(); ?>
|
||||
|
||||
<p><?= Html::a('bower.json Format »', ['/docs/bower-format'], ['class' => 'btn btn-sm btn-default']); ?></p>
|
||||
<p>
|
||||
<?= Html::a('Update <i class="glyphicon glyphicon-chevron-right"></i>', ['update', 'name' => $model->name], ['class' => 'btn btn-sm btn-default']); ?>
|
||||
<?= Html::a('bower.json Format <i class="glyphicon glyphicon-chevron-right"></i>', ['/docs/bower-format'], ['class' => 'btn btn-sm btn-default']); ?>
|
||||
</p>
|
||||
|
||||
<?php if (strpos($model->url, 'github.com') || strpos($model->url, 'bitbucket.org')) { ?>
|
||||
<h2>Auto Update using Webhooks</h2>
|
||||
<p>Adding a webhook to your repository will update minetest-bower with the latest information each time you push a change.</p>
|
||||
|
||||
<?php if (strpos($model->url, 'github.com')) { ?>
|
||||
<p>1) Go to the <?= Html::a('repository', Git::getUrl($model->url)) ?>, then click
|
||||
<em>Settings</em> from the right-hand menu.</p>
|
||||
<?= Html::img('https://cloud.githubusercontent.com/assets/51875/9213427/6689597c-40d1-11e5-8f9c-5582e4d77dd2.png'); ?>
|
||||
<br><br>
|
||||
|
||||
<p>2) Click <em>Webhooks and Services</em>, then click <em>Add webhook</em>.</p>
|
||||
<?= Html::img('https://cloud.githubusercontent.com/assets/51875/9213433/7507bd2c-40d1-11e5-9a42-4f5e3a1da18e.png'); ?>
|
||||
<br><br>
|
||||
|
||||
<p>3) Enter <code><?= Url::to(['view', 'name' => $model->name], true); ?></code> into the
|
||||
<em>Payload URL</em>, then click <em>Add webhook</em>.</p>
|
||||
<?= Html::img('https://cloud.githubusercontent.com/assets/51875/9213435/7cf27a68-40d1-11e5-888a-c4692ad9f4b9.png'); ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (strpos($model->url, 'bitbucket.org')) { ?>
|
||||
<p>1) Go to the <?= Html::a('repository', Git::getUrl($model->url)) ?>, then click
|
||||
<em>Settings</em> from the left-hand menu.</p>
|
||||
<?= Html::img('https://cloud.githubusercontent.com/assets/51875/9213650/39776c5a-40d4-11e5-82bc-3ca6fd81d7b5.png'); ?>
|
||||
<br><br>
|
||||
|
||||
<p>2) Click <em>Webhooks</em>.</p>
|
||||
<?= Html::img('https://cloud.githubusercontent.com/assets/51875/9213652/3da76672-40d4-11e5-98d2-16c04f3c2fd2.png'); ?>
|
||||
<br><br>
|
||||
|
||||
<p>3) Enter <code><?= Url::to(['view', 'name' => $model->name], true); ?></code> into the
|
||||
<em>Payload URL</em>, then click <em>Add webhook</em>.</p>
|
||||
<?php //echo Html::img('https://cloud.githubusercontent.com/assets/51875/9213435/7cf27a68-40d1-11e5-888a-c4692ad9f4b9.png'); ?>
|
||||
|
||||
<?= Html::a('waiting on bitbucket for screenshot', 'https://github.com/cornernote/minetest-bower/issues/21'); ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user