Skip to content

Commit

Permalink
Merge branch 'feature/git-integration'
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Jul 6, 2020
2 parents 85162e4 + d23c148 commit 0902b78
Show file tree
Hide file tree
Showing 117 changed files with 2,629 additions and 396 deletions.
133 changes: 133 additions & 0 deletions config/git.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Git Integration
|--------------------------------------------------------------------------
|
| Whether Statamic's git integration should be enabled. This feature
| assumes that git is already installed and accessible by your
| PHP process' server user. For more info, see the docs at:
|
| https://statamic.dev/git-integration
|
*/

'enabled' => env('STATAMIC_GIT_ENABLED', false),

/*
|--------------------------------------------------------------------------
| Automatically Run
|--------------------------------------------------------------------------
|
| By default, commits are automatically queued when `Saved` or `Deleted`
| events are fired. If you prefer users to manually trigger commits
| using the `Git` utility interface, you may set this to `false`.
|
*/

'automatic' => env('STATAMIC_GIT_AUTOMATIC', true),

/*
|--------------------------------------------------------------------------
| Dispatch Delay
|--------------------------------------------------------------------------
|
| When `Saved` and `Deleted` events queue up commits, you may wish to
| set a delay time in minutes for each queued job. This can allow
| for more consolidated commits when you have multiple users
| making simultaneous content changes to your repository.
|
| Note: Not supported by default `sync` queue driver.
|
*/

'dispatch_delay' => env('STATAMIC_GIT_DISPATCH_DELAY', 0),

/*
|--------------------------------------------------------------------------
| Git User
|--------------------------------------------------------------------------
|
| The git user that will be used when committing changes. By default, it
| will attempt to commit with the authenticated user's name and email
| when possible, falling back to the below user when not available.
|
*/

'use_authenticated' => true,

'user' => [
'name' => env('STATAMIC_GIT_USER_NAME', 'Spock'),
'email' => env('STATAMIC_GIT_USER_EMAIL', 'spock@example.com'),
],

/*
|--------------------------------------------------------------------------
| Tracked Paths
|--------------------------------------------------------------------------
|
| Define the tracked paths to be considered when staging changes. Default
| stache and file locations are already set up for you, but feel free
| to modify these paths to suit your storage config. Referencing
| absolute paths to external repos is also completely valid.
|
*/

'paths' => [
base_path('content'),
base_path('users'),
resource_path('blueprints'),
resource_path('fieldsets'),
resource_path('forms'),
resource_path('users'),
],

/*
|--------------------------------------------------------------------------
| Commands
|--------------------------------------------------------------------------
|
| Define a list commands to be run when Statamic is ready to `git add`
| and `git commit` your changes. These commands will be run once
| per repo, attempting to consolidate commits where possible.
|
*/

'commands' => [
'git add {{ paths }}',
'git -c "user.name={{ name }}" -c "user.email={{ email }}" commit -m "{{ message }}"',
],

/*
|--------------------------------------------------------------------------
| Push
|--------------------------------------------------------------------------
|
| Determine whether `git push` should be run after the commands above
| have finished. This is disabled by default, but can be enabled
| globally, or per environment using the provided variable.
|
*/

'push' => env('STATAMIC_GIT_PUSH', false),

/*
|--------------------------------------------------------------------------
| Ignored Events
|--------------------------------------------------------------------------
|
| Statamic will listen on all `Saved` and `Deleted` events, as well
| as any events registered by installed addons. If you wish to
| ignore any specific events, you may reference them here.
|
*/

'ignored_events' => [
// \Statamic\Events\Data\UserSaved::class,
// \Statamic\Events\Data\UserDeleted::class,
],

];
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@popperjs/core": "^2.1.0",
"@shopify/draggable": "^1.0.0-beta.8",
"@simonwep/pickr": "^1.5.1",
"ansi-to-html": "^0.6.14",
"autosize": "~3.0.12",
"axios": "^0.19.2",
"body-scroll-lock": "^2.6.4",
Expand Down
28 changes: 26 additions & 2 deletions resources/js/components/ComposerOutput.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
<template>
<div>
<p class="mb-2 font-bold flex items-center justify-between">
<p class="font-bold flex items-center justify-between">
<template v-if="composer.status">{{ composer.status }}</template>
<loading-graphic v-if="polling" text="" class="h-6 w-6"/>
</p>
<pre v-if="output" class="p-1 rounded bg-grey-30 text-grey text-sm clearfix">{{ output }}</pre>
<div class="mt-2 p-2 rounded text-sm font-mono bg-black text-white">
<div
ref="output"
class="whitespace-pre-wrap h-96 overflow-auto" v-html="coloredOutput" />
</div>
</div>
</template>

<script>
const ansi = require('ansi-to-html');
export default {
props: {
package: {
Expand All @@ -27,6 +33,13 @@
watch: {
polling(polling) {
this.$progress.loading('composer-installing', polling);
},
output() {
this.$nextTick(() => {
const div = this.$refs.output;
div.scrollTop = div.scrollHeight - div.clientHeight;
});
}
},
Expand All @@ -37,6 +50,17 @@
params() {
return {package: this.package};
},
coloredOutput() {
return new ansi({
fg: "#c7c7c7",
bg: "#000000",
colors: [
'#000000', '#c91b00', '#00c200', '#c7c400', '#0225c7', '#c930c7', '#00c5c7', '#c7c7c7',
'#676767', '#ff6d67', '#5ff967', '#fefb67', '#6871ff', '#ff76ff', '#5ffdff', '#feffff',
]
}).toHtml(this.output || '');
}
},
Expand Down
40 changes: 40 additions & 0 deletions resources/lang/de-CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
"Add Section": "Abschnitt hinzufügen",
"Add Set": "Set hinzufügen",
"Add Time": "Zeit hinzufügen",
"Added": "Hinzugefügt",
"Addon Settings": "Addon-Einstellungen",
"Addons": "Addons",
"Affected files": "Betroffene Dateien",
"After": "Nach",
"All": "Alle",
"All caches cleared.": "Alle Caches wurden gelöscht.",
Expand Down Expand Up @@ -73,8 +75,15 @@
"Are you sure? Unsaved changes will be lost.": "Bist du sicher? Nicht gespeicherte Änderungen gehen verloren.",
"Ascending": "Aufsteigend",
"Asset container created": "Datei-Container erstellt",
"Asset container deleted": "Asset-Container gelöscht",
"Asset container saved": "Asset-Container gespeichert",
"Asset container updated": "Datei-Container aktualisiert",
"Asset Containers": "Datei-Container",
"Asset deleted": "Asset gelöscht",
"Asset folder deleted": "Asset-Ordner gelöscht",
"Asset folder saved": "Asset-Ordner gespeichert",
"Asset saved": "Asset gespeichert",
"Asset uploaded": "Asset hochgeladen",
"Assets": "Dateien",
"Author": "Autor",
"Automatic Line Breaks": "Automatische Zeilenumbrüche",
Expand All @@ -85,6 +94,8 @@
"Blockquote": "Blockzitat",
"Blueprint": "Blueprint",
"Blueprint created": "Blueprint erstellt",
"Blueprint deleted": "Blaupause gelöscht",
"Blueprint saved": "Blaupause gespeichert",
"Blueprints": "Blueprints",
"Bold": "Fett",
"Browse": "Durchsuchen",
Expand Down Expand Up @@ -117,10 +128,13 @@
"Collection": "Sammlung",
"Collection already exists": "Sammlung existiert bereits",
"Collection created": "Sammlung erstellt",
"Collection deleted": "Sammlung gelöscht",
"Collection saved": "Sammlung gespeichert",
"Collections": "Sammlungen",
"Color Modes": "Farbmodi",
"Columns": "Spalten",
"Columns have been reset to their defaults.": "Die Spalten wurden auf ihre Grundeinstellungen zurückgesetzt.",
"Commit": "Verpflichten",
"Conditions": "Bedingungen",
"Configuration": "Konfiguration",
"Configure": "Konfigurieren",
Expand All @@ -137,7 +151,9 @@
"Container": "Container",
"Contains": "enthält",
"Content": "Inhalt",
"Content committed": "Inhalt verpflichtet",
"Content Model": "Inhaltsmodell",
"Content saved": "Inhalt gespeichert",
"Content Stache": "Content Stache",
"Create": "Erstellen",
"Create & Link Item": "Eintrag erstellen & verknüpfen",
Expand Down Expand Up @@ -245,10 +261,12 @@
"Entries successfully reordered": "Einträge erfolgreich umsortiert",
"Entry": "Eintrag",
"Entry created": "Eintrag erstellt",
"Entry deleted": "Eintrag gelöscht",
"Entry has a published version": "Eintrag hat eine veröffentlichte Version",
"Entry has not been published": "Eintrag wurde nicht veröffentlicht",
"Entry has unpublished changes": "Eintrag hat unveröffentlichte Änderungen",
"Entry link": "Link zum Eintrag",
"Entry saved": "Eintrag gespeichert",
"Escape Markup": "Markup auslassen",
"Everything is up to date.": "Alles ist auf dem neusten Stand.",
"Example": "Beispiel",
Expand All @@ -268,6 +286,8 @@
"Fields": "Felder",
"Fieldset": "Fieldset",
"Fieldset created": "Fieldset erstellt",
"Fieldset deleted": "Feldsatz gelöscht",
"Fieldset saved": "Feldsatz gespeichert",
"Fieldsets": "Fieldsets",
"Fieldtypes": "Feldtypen",
"File": "Datei",
Expand All @@ -292,6 +312,8 @@
"Forgot Your Password?": "Passwort vergessen?",
"Form already exists": "Formular existiert bereits",
"Form created": "Formular erstellt",
"Form deleted": "Formular gelöscht",
"Form saved": "Formular gespeichert",
"Form Submission": "Antworten",
"Format": "Format",
"Forms": "Formulare",
Expand All @@ -300,6 +322,8 @@
"Future Date Behavior": "Einträge in der Zukunft",
"Generate": "Generieren",
"Global Set created": "Globales Set erstellt",
"Global Set deleted": "Globaler Satz gelöscht",
"Global Set saved": "Global Set gespeichert",
"Global Sets": "Globale Sets",
"Global Variables": "globale Variablen",
"Globals": "Globale Inhalte",
Expand Down Expand Up @@ -408,13 +432,16 @@
"Miscellaneous": "Verschiedenes",
"Mobile": "Mobile",
"Mode": "Modus",
"Modified": "Geändert",
"Mount": "Mounten",
"Move": "Verschieben",
"Move Asset|Move :count Assets": "Datei verschieben|:count Dateien verschieben",
"Move File": "Datei verschieben",
"Multiple": "Mehrfachauswahl",
"Name": "Name",
"Navigation": "Navigation",
"Navigation deleted": "Navigation gelöscht",
"Navigation saved": "Navigation gespeichert",
"Never": "Nie",
"New :thing": "Neuer :thing",
"New Section": "Neuer Abschnitt",
Expand Down Expand Up @@ -496,6 +523,7 @@
"Reorderable": "Umordnen",
"Replace": "Ersetzen",
"Reply To": "Antwort an (Reply to)",
"Repository path": "Repository-Pfad",
"Reset": "Zurücksetzen",
"Reset Password": "Passwort zurücksetzen",
"Resources scaffolded": "Ressourcen sind bereitgestellt",
Expand All @@ -511,6 +539,8 @@
"Revisions": "Überarbeitungen",
"Role": "Rolle",
"Role created": "Rolle erstellt",
"Role deleted": "Rolle gelöscht",
"Role saved": "Rolle gespeichert",
"Role updated": "Rolle aktualisiert",
"Roles": "Rollen",
"Roles & Groups": "Rollen & Gruppen",
Expand Down Expand Up @@ -582,6 +612,8 @@
"Strategy": "Strategie",
"Strikethrough": "Durchgestrichen",
"Structured": "Strukturiert",
"Submission deleted": "Einreichung gelöscht",
"Submission saved": "Einreichung gespeichert",
"Submission successful.": "Erfolgreich übermittelt.",
"Submissions": "Antworten",
"Submit": "Senden",
Expand All @@ -600,8 +632,12 @@
"Taggable": "Markierbar",
"Taxonomies": "Taxonomien",
"Taxonomy created": "Taxonomie erstellt",
"Taxonomy deleted": "Taxonomie gelöscht",
"Taxonomy saved": "Taxonomie gespeichert",
"Template": "Template",
"Term created": "Begriff erstellt",
"Term deleted": "Begriff gelöscht",
"Term saved": "Begriff gespeichert",
"Terms": "Begriffe",
"Test email sent.": "Test E-Mail gesendet.",
"Text": "Text",
Expand Down Expand Up @@ -659,10 +695,14 @@
"Useful Links": "Nützliche Links",
"User": "Benutzer*in",
"User created": "Benutzer*in erstellt",
"User deleted": "Benutzer gelöscht",
"User group created": "Benutzergruppe erstellt",
"User group deleted": "Benutzergruppe gelöscht",
"User group saved": "Benutzergruppe gespeichert",
"User group updated": "Benutzergruppe aktualisiert",
"User Groups": "Benutzergruppen",
"User Information": "Benutzerinformation",
"User saved": "Benutzer gespeichert",
"Username": "Benutzername",
"Users": "Benutzer",
"Utilities": "Hilfsmittel",
Expand Down
3 changes: 3 additions & 0 deletions resources/lang/de-CH/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
'getting_started_widget_intro' => 'Wir empfehlen dir beim Aufbau deiner neuen Statamic 3 Webseite mit diesen Schritten zu beginnen.',
'getting_started_widget_navigation' => 'Erstelle mehrstufige Listen mit Links, die für die Gestaltung von Navbars, Fuszeilen etc. verwendet werden können.',
'getting_started_widget_reminder' => 'Bitte denke daran: <b>Statamic ist eine kommerzielle Software</b> und du musst möglicherweise eine entsprechende Lizenz erwerben, um Statamic nach Ablauf der Beta-Phase weiter nutzen zu können.',
'git_disabled' => 'Die statische Git-Integration ist derzeit deaktiviert.',
'git_nothing_to_commit' => 'Nichts zu begehen, Inhaltspfade sauber!',
'git_utility_description' => 'Verwalten Sie den von Git verfolgten Inhalt.',
'global_search_open_using_slash' => 'Starte die globale Suche mit der Taste <kbd>/</kbd>',
'global_set_config_intro' => 'Globale Sets verwalten Inhalte, die auf der gesamten Webseite verfügbar sind, wie z.B. Firmendetails, Kontaktinformationen oder Frontend-Einstellungen.',
'globals_blueprint_instructions' => 'Das Blueprint steuert die Felder, die beim Bearbeiten der Variablen angezeigt werden sollen.',
Expand Down

0 comments on commit 0902b78

Please sign in to comment.