Skip to content

Commit

Permalink
Add continent to groups.json
Browse files Browse the repository at this point in the history
  • Loading branch information
inxilpro committed Nov 22, 2024
1 parent 0fef1ec commit dc11115
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Actions/SyncGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ protected function syncConfigWithGroup(string $domain, array $config): Group
$group->forceFill(Arr::only($config, [
'name',
'region',
'continent',
'description',
'timezone',
'bsky_url',
Expand All @@ -102,6 +103,7 @@ protected function syncConfigWithExternalGroup(string $domain, array $config): E
$external_group->forceFill(Arr::only($config, [
'name',
'region',
'continent',
'latitude',
'longitude',
]));
Expand Down
1 change: 1 addition & 0 deletions groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"external": false,
"name": "PHP×BRU",
"region": "Brussels",
"continent": "Europe",
"description": "PHP & Laravel meetups for belgian developers",
"timezone": "Europe/Brussels",
"bsky_url": "https://bsky.app/profile/phpxbru.com",
Expand Down
8 changes: 8 additions & 0 deletions resources/markdown/organizers.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ Awesome. You want to start a PHP× group! Here are the basic steps to get starte
- `external` — always set this to `false` if you want us to host for you
- `name` — use "PHP×FOO" where FOO is the code you picked in step 2. Please use the unicode times symbol “×” rather than the letter “x” (you can just copy-and-paste from here).
- `region` — Set this to a short descriptive name of your region (like Philadelphia or Atlanta)
- `continent` — One of:
- `Africa`
- `Asia`
- `Europe`
- `North America`
- `South America`
- `Antarctica`
- `Australia`
- `description` — Set this to a single-sentence description of your meetup. Something like: _"A Philly-area PHP meetup for web artisans who want to learn and connect."_
- `timezone` — Use your PHP-compatible timezone ID (like `America/New_York`)
- `status` — choose one of:
Expand Down
5 changes: 5 additions & 0 deletions tests/Feature/GroupsJsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Tests\Feature;

use App\Enums\Continent;
use App\Enums\GroupStatus;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;
Expand Down Expand Up @@ -33,6 +34,10 @@ protected function assertValidGroup(string $domain, array $config): void
Assert::assertNotNull(GroupStatus::from($status));
}

if ($continent = data_get($config, 'continent')) {
Assert::assertNotNull(Continent::from($continent));
}

if ($frequency = data_get($config, 'frequency')) {
Assert::assertTrue(Str::contains($frequency, ['week', 'month', 'quarter', 'year']));
}
Expand Down

0 comments on commit dc11115

Please sign in to comment.