Skip to content

DX-1128: docs-native Icon component and direct HeroIcon usage (drop @ably/ui/core/Icon) #1764

DX-1128: docs-native Icon component and direct HeroIcon usage (drop @ably/ui/core/Icon)

DX-1128: docs-native Icon component and direct HeroIcon usage (drop @ably/ui/core/Icon) #1764

Workflow file for this run

name: Deploy Review App
on:
pull_request:
types: [labeled, unlabeled, closed]
permissions: {}
jobs:
manage-review-app:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
pull-requests: read
if: |
(github.event.action == 'labeled' && github.event.label.name == 'review-app') ||
(github.event.action == 'unlabeled' && github.event.label.name == 'review-app') ||
(github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'review-app'))
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Check if user is an Ably organization member
if: github.event.action == 'labeled' && github.event.label.name == 'review-app'
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
github-token: ${{ secrets.ABLY_ORG_TOKEN }}
script: |
try {
const labelCreator = context.actor;
console.log(`Label creator: ${labelCreator}`);
// Check if user is a member of the Ably organization
const { data: membership } = await github.rest.orgs.getMembershipForUser({
org: 'ably',
username: labelCreator
});
console.log(`Membership state: ${membership.state}`);
console.log(`Membership role: ${membership.role}`);
// Check if user is an active member (not just pending invitation)
if (membership.state !== 'active') {
core.setFailed(`User ${labelCreator} does not have active membership in the Ably organization`);
return;
}
console.log(`✅ User ${labelCreator} is an active member of the Ably organization`);
} catch (error) {
// If we get a 404, the user is not a member of the organization
if (error.status === 404) {
core.setFailed(`User ${context.actor} is not a member of the Ably organization`);
} else {
core.setFailed(`Failed to check Ably organization membership: ${error.message}`);
}
}
- name: Manage Heroku Review App
uses: fastruby/manage-heroku-review-app@9fa49f0320460f278c3687bc348dd0cbb18555dc # v1.3
with:
action: ${{ (github.event.action == 'labeled' && github.event.label.name == 'review-app' && 'create') || 'destroy' }}
env:
HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
HEROKU_PIPELINE_ID: ${{ secrets.HEROKU_PIPELINE_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}