Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/aws_auto_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ jobs:

# Read CODEOWNERS file if it exists
if [[ -f ".github/CODEOWNERS" ]]; then
echo "📋 Reading CODEOWNERS file..."
echo "[INFO] Reading CODEOWNERS file..."
# Extract usernames from CODEOWNERS (remove @ prefix)
codeowners=$(grep -v '^#' .github/CODEOWNERS | grep -o '@[a-zA-Z0-9_-]*' | sed 's/@//' | sort -u)
for user in $codeowners; do
authorized_users+=("$user")
echo " - CODEOWNER: $user"
done
else
echo "⚠️ No CODEOWNERS file found"
echo "[WARN] No CODEOWNERS file found"
fi

# Get repository collaborators with admin/maintain permissions using GitHub API
echo "🔍 Checking repository permissions..."
echo "[CHECK] Checking repository permissions..."

# Check if user has admin or maintain permissions
user_permission=$(curl -s -H "Authorization: token ${{ secrets.PAT }}" \
Expand All @@ -65,15 +65,15 @@ jobs:
for user in "${authorized_users[@]}"; do
if [[ "$user" == "$merged_by" ]]; then
is_authorized=true
echo " User $merged_by is authorized via CODEOWNERS"
echo "[OK] User $merged_by is authorized via CODEOWNERS"
break
fi
done

# Check if user has admin or maintain permissions
if [[ "$user_permission" == "admin" || "$user_permission" == "maintain" ]]; then
is_authorized=true
echo " User $merged_by is authorized via repository permissions ($user_permission)"
echo "[OK] User $merged_by is authorized via repository permissions ($user_permission)"
fi

# Check if user is organization owner (for metaversecloud-com org)
Expand All @@ -94,21 +94,21 @@ jobs:

if [[ "$owner_status" == "admin" ]]; then
is_authorized=true
echo " User $merged_by is authorized as organization owner"
echo "[OK] User $merged_by is authorized as organization owner"
fi
fi

echo "is_authorized=$is_authorized" >> $GITHUB_OUTPUT

if [[ "$is_authorized" == "false" ]]; then
echo " User $merged_by is not authorized to trigger releases"
echo "💡 Authorized users include:"
echo "[ERROR] User $merged_by is not authorized to trigger releases"
echo "[TIP] Authorized users include:"
echo " - CODEOWNERS: ${authorized_users[*]}"
echo " - Repository admins and maintainers"
echo " - Organization owners"
exit 0
else
echo "🎉 User $merged_by is authorized to trigger releases"
echo "[SUCCESS] User $merged_by is authorized to trigger releases"
fi

- name: Check for release labels and determine version bumps
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
generate_release_notes: true
make_latest: true
body: |
## 🚀 Release ${{ env.NEW_VERSION }}
## ? Release ${{ env.NEW_VERSION }}

**Version Bumps Applied:**
- Major: ${{ steps.check.outputs.has_major }}
Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ Scene Swapper is an on-canvas application allowing users to swap scenes by click

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

## Developers:
## Developers

### Built With

#### Server

![Node.js](https://img.shields.io/badge/node.js-%2343853D.svg?style=for-the-badge&logo=node.js&logoColor=white)
![Express](https://img.shields.io/badge/express-%23000000.svg?style=for-the-badge&logo=express&logoColor=white)

### Add your .env environmental variables

Expand All @@ -33,8 +40,10 @@ SCENE_IDS=xxxxxxxxxxxxxx,xxxxxxxxxxxxxx,xxxxxxxxxxxxxx

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

### Implementation Requirements

The `SCENE_IDS` environment variable should contain a comma-separated list of scene IDs that the asset will cycle through when clicked.

### Helpful links

- [SDK Developer docs](https://metaversecloud-com.github.io/mc-sdk-js/index.html)
- [View it in action!](topia.io/bulletin-board-prod)
- [Notion One Pager](https://www.notion.so/topiaio/Bulletin-Board-18171cde990b447693aee8b26b03f872?pvs=4)
3 changes: 2 additions & 1 deletion client/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ const Home = () => {
.then((response) => {
const { allowNonAdmins, isAdmin, lastSwappedDate, scenes, selectedSceneId, title, description } =
response.data;
updateLastSwappedDate(lastSwappedDate);
setIsAdmin(isAdmin);
setAllowNonAdmins(allowNonAdmins);
setScenes(scenes);
setSelectedSceneId(selectedSceneId);
if (title) setTitle(title);
if (description) setDescription(description);

updateLastSwappedDate(lastSwappedDate);
})
.catch((error) => setErrorMessage(dispatch, error))
.finally(() => {
Expand Down
Loading