Skip to content

Commit cd6a0fd

Browse files
authored
Merge pull request #10 from metaversecloud-com/dev
EXP-574: Fix Admin Options
2 parents 82750f4 + 305be00 commit cd6a0fd

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

.github/workflows/aws_auto_release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ jobs:
3636
3737
# Read CODEOWNERS file if it exists
3838
if [[ -f ".github/CODEOWNERS" ]]; then
39-
echo "📋 Reading CODEOWNERS file..."
39+
echo "[INFO] Reading CODEOWNERS file..."
4040
# Extract usernames from CODEOWNERS (remove @ prefix)
4141
codeowners=$(grep -v '^#' .github/CODEOWNERS | grep -o '@[a-zA-Z0-9_-]*' | sed 's/@//' | sort -u)
4242
for user in $codeowners; do
4343
authorized_users+=("$user")
4444
echo " - CODEOWNER: $user"
4545
done
4646
else
47-
echo "⚠️ No CODEOWNERS file found"
47+
echo "[WARN] No CODEOWNERS file found"
4848
fi
4949
5050
# Get repository collaborators with admin/maintain permissions using GitHub API
51-
echo "🔍 Checking repository permissions..."
51+
echo "[CHECK] Checking repository permissions..."
5252
5353
# Check if user has admin or maintain permissions
5454
user_permission=$(curl -s -H "Authorization: token ${{ secrets.PAT }}" \
@@ -65,15 +65,15 @@ jobs:
6565
for user in "${authorized_users[@]}"; do
6666
if [[ "$user" == "$merged_by" ]]; then
6767
is_authorized=true
68-
echo " User $merged_by is authorized via CODEOWNERS"
68+
echo "[OK] User $merged_by is authorized via CODEOWNERS"
6969
break
7070
fi
7171
done
7272
7373
# Check if user has admin or maintain permissions
7474
if [[ "$user_permission" == "admin" || "$user_permission" == "maintain" ]]; then
7575
is_authorized=true
76-
echo " User $merged_by is authorized via repository permissions ($user_permission)"
76+
echo "[OK] User $merged_by is authorized via repository permissions ($user_permission)"
7777
fi
7878
7979
# Check if user is organization owner (for metaversecloud-com org)
@@ -94,21 +94,21 @@ jobs:
9494
9595
if [[ "$owner_status" == "admin" ]]; then
9696
is_authorized=true
97-
echo " User $merged_by is authorized as organization owner"
97+
echo "[OK] User $merged_by is authorized as organization owner"
9898
fi
9999
fi
100100
101101
echo "is_authorized=$is_authorized" >> $GITHUB_OUTPUT
102102
103103
if [[ "$is_authorized" == "false" ]]; then
104-
echo " User $merged_by is not authorized to trigger releases"
105-
echo "💡 Authorized users include:"
104+
echo "[ERROR] User $merged_by is not authorized to trigger releases"
105+
echo "[TIP] Authorized users include:"
106106
echo " - CODEOWNERS: ${authorized_users[*]}"
107107
echo " - Repository admins and maintainers"
108108
echo " - Organization owners"
109109
exit 0
110110
else
111-
echo "🎉 User $merged_by is authorized to trigger releases"
111+
echo "[SUCCESS] User $merged_by is authorized to trigger releases"
112112
fi
113113
114114
- name: Check for release labels and determine version bumps
@@ -221,7 +221,7 @@ jobs:
221221
generate_release_notes: true
222222
make_latest: true
223223
body: |
224-
## 🚀 Release ${{ env.NEW_VERSION }}
224+
## ? Release ${{ env.NEW_VERSION }}
225225
226226
**Version Bumps Applied:**
227227
- Major: ${{ steps.check.outputs.has_major }}

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ Scene Swapper is an on-canvas application allowing users to swap scenes by click
1414

1515
- Key Asset: the data object attached to the dropped key asset stores the default and currently displayed scene.
1616

17-
## Developers:
17+
## Developers
18+
19+
### Built With
20+
21+
#### Server
22+
23+
![Node.js](https://img.shields.io/badge/node.js-%2343853D.svg?style=for-the-badge&logo=node.js&logoColor=white)
24+
![Express](https://img.shields.io/badge/express-%23000000.svg?style=for-the-badge&logo=express&logoColor=white)
1825

1926
### Add your .env environmental variables
2027

@@ -33,8 +40,10 @@ SCENE_IDS=xxxxxxxxxxxxxx,xxxxxxxxxxxxxx,xxxxxxxxxxxxxx
3340

3441
[Topia Production Account Dashboard](https://topia.io/t/dashboard/integrations)
3542

43+
### Implementation Requirements
44+
45+
The `SCENE_IDS` environment variable should contain a comma-separated list of scene IDs that the asset will cycle through when clicked.
46+
3647
### Helpful links
3748

3849
- [SDK Developer docs](https://metaversecloud-com.github.io/mc-sdk-js/index.html)
39-
- [View it in action!](topia.io/bulletin-board-prod)
40-
- [Notion One Pager](https://www.notion.so/topiaio/Bulletin-Board-18171cde990b447693aee8b26b03f872?pvs=4)

client/src/pages/Home.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ const Home = () => {
3333
.then((response) => {
3434
const { allowNonAdmins, isAdmin, lastSwappedDate, scenes, selectedSceneId, title, description } =
3535
response.data;
36-
updateLastSwappedDate(lastSwappedDate);
3736
setIsAdmin(isAdmin);
3837
setAllowNonAdmins(allowNonAdmins);
3938
setScenes(scenes);
4039
setSelectedSceneId(selectedSceneId);
4140
if (title) setTitle(title);
4241
if (description) setDescription(description);
42+
43+
updateLastSwappedDate(lastSwappedDate);
4344
})
4445
.catch((error) => setErrorMessage(dispatch, error))
4546
.finally(() => {

0 commit comments

Comments
 (0)