Przejdź do treści
Biblioteka skilli
DevOps i chmura · Automatyzacja

hootsuite-ci-integration

/hootsuite-ci-integration

Konfiguruje integrację Hootsuite z CI/CD w GitHub Actions oraz automatyczne testy w potoku budowania.

Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
5
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Konfiguruje integrację Hootsuite z CI/CD w GitHub Actions oraz automatyczne testy w potoku budowania.

Wyzwalacze z opisu

hootsuite CIhootsuite GitHub Actionshootsuite automated testsCI hootsuite
Oryginalny opis (EN)

Configure Hootsuite CI/CD integration with GitHub Actions and testing. Use when setting up automated testing, configuring CI pipelines, or integrating Hootsuite tests into your build process. Trigger with phrases like "hootsuite CI", "hootsuite GitHub Actions", "hootsuite automated tests", "CI hootsuite".

Jak działa

  1. Overview
  2. GitHub Actions Workflow
  3. Mock-Based Unit Tests
  4. Integration Tests
  5. Error Handling
  6. Prerequisites
  7. Instructions
  8. Output
  9. Examples
  10. Resources
Sekcje z nagłówków SKILL.md, w oryginale · 156 linii, 622 słów
Podgląd SKILL.md
---
name: hootsuite-ci-integration
description: 'Configure Hootsuite CI/CD integration with GitHub Actions and testing.

  Use when setting up automated testing, configuring CI pipelines,

  or integrating Hootsuite tests into your build process.

  Trigger with phrases like "hootsuite CI", "hootsuite GitHub Actions",

  "hootsuite automated tests", "CI hootsuite".

  '
allowed-tools: Read, Write, Edit, Bash(gh:*)
version: 1.6.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
- saas
- hootsuite
- social-media
compatibility: Designed for Claude Code
---
# Hootsuite CI Integration

## Overview

Set up CI/CD for Hootsuite social media management integrations: run unit tests with mocked post scheduling and analytics responses on every PR, validate live API connectivity for social profile queries on merge to main. Hootsuite's API handles scheduled posts, social analytics, and multi-network publishing, so CI pipelines verify scheduling logic, content validation rules, and analytics data aggregation.

## GitHub Actions Workflow

```yaml
# .github/workflows/hootsuite-ci.yml
name: Hootsuite CI
on:
  pull_request:
    paths: ['src/hootsuite/**', 'tests/**']
  push:
    branches: [main]

jobs:
  unit-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20' }
      - run: npm ci
      - run: npm test -- --reporter=verbose

  integration-tests:
    if: github.ref == 'refs/heads/main'
    needs: unit-tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20' }
      - run: npm ci
      - run: npm run test:integration
        env:
          HOOTSUITE_CLIENT_ID: ${{ secrets.HOOTSUITE_CLIENT_ID }}
          HOOTSUITE_CLIENT_SECRET: ${{ secrets.HOOTSUITE_CLIENT_SECRET }}
          HOOTSUITE_REFRESH_TOKEN: ${{ secrets.HOOTSUITE_REFRESH_TOKEN }}
```

## Mock-Based Unit Tests

```typescript
// tests/hootsuite-service.test.ts
import { describe, it, expect, vi } from 'vitest';
import { schedulePost, getPostAnalytics } from '../src/hootsuite-service';

vi.mock('../src/hootsuite-client', () => ({
  HootsuiteClient: vi.fn().mockImplementation(() => ({
    createMessage: vi.fn().mockResolvedValue({
      id: 'msg_abc123',
      state: 'SCHEDULED',
      scheduledSendTime: '2026-04-07T14:00:00Z',
      socialProfileIds: ['sp_twitter', 'sp_linkedin'],
    }),
    getAnalytics: vi.fn().mockResolvedValue({
      postId: 'msg_abc123',
      metrics: { impressions: 1200, clicks: 85, engagement_rate: 0.071 },
    }),
    listSocialProfiles: vi.fn().mockResolvedValue({
      profiles: [
        { id: 'sp_twitter', type: 'TWITTER', name: '@company' },
        { id: 'sp_linkedin', type: 'LINKEDIN', name: 'Company Page' },
      ],
    }),
  })),
}));

describe('Hootsuite Service', () => {
  it('schedules a multi-network post', async () => {
    const result = await schedulePost('Launch day!', {
      profiles: ['sp_twitter', 'sp_linkedin'],
      scheduledTime: '2026-04-07T14:00:00Z',
    });
    expect(result.state).toBe('SCHEDULED');
    expect(result.socialProfileIds).toHaveLength(2);
  });

  it('retrieves post analytics', async () => {
    const analytics = await getPostAnalytics('msg_abc123');
    expect(analytics.metrics.engagement_rate).toBeGreaterThan(0.05);
  });
});
```

## Integration Tests

```typescript
// tests/integration/hootsuite.integration.test.ts
import { describe, it, expect } from 'vitest';

const hasCredentials = !!process.env.HOOTSUITE_CLIENT_ID;

describe.skipIf(!hasCredentials)('Hootsuite Live API', () => {
  it('lists social profiles via OAuth', async () => {
    const tokenRes = await fetch('https://platform.hootsuite.com/oauth2/token', {
      method: 'POST',
      headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
      body: new URLSearchParams({
        grant_type: 'refresh_token',
        client_id: process.env.HOOTSUITE_CLIENT_ID!,
        client_secret: process.env.HOOTSUITE_CLIENT_SECRET!,
        refresh_token: process.env.HOOTSUITE_REFRESH_TOKEN!,
      }),
    });
    const { access_token } = await tokenRes.json();
    const res = await fetch('https://platform.hootsuite.com/v1/socialProfiles', {
      headers: { Authorization: `Bearer ${access_token}` },
    });
    expect(res.status).toBe(200);
  });
});
```

## Error Handling

| CI Issue | Cause | Fix |
|----------|-------|-----|
| `401 Unauthorized` | Refresh token expired | Re-authorize OAuth flow and update `HOOTSUITE_REFRESH_TOKEN` secret |
| Post scheduling fails | Social profile disconnected | Verify profile connections in Hootsuite dashboard |
| Analytics returns empty | Post too recent (< 24h) | Wait for analytics processing or use older post IDs |
| Rate limit (429) | Exceeded 300 requests/min | Add request throttling and reduce parallel test concurrency |
| Duplicate post detected | Same content scheduled twice | Add idempotency key or content hash check before scheduling |

## Prerequisites

- CI secret references, a sandbox social profile or draft-only API target, fictitious fixtures, protected branches, and a rollback mechanism.

## Instructions

1. Run mocked tests first, including malformed payload, denied account, approval-required, audience mismatch, quota, and cancellation cases.
2. Run a bounded sandbox integration with idempotency; prohibit real public-profile destinations and literal tokens in CI.
3. Emit aggregate counts, opaque IDs, approval/audience policy revisions only; fail on unexpected scope, copy leakage, or public-post path.
4. Canary draft scheduling after protected review, verify no-publication behavior, and restore the last-known-good revision on failure.

## Output

Publish a CI receipt with commit SHA, fixture revision, sandbox profile, test totals, policy checks, draft-canary outcome, and rollback reference. Exclude copy, media, handles, and secrets.

## Examples

`sha=abc123; fixtures=v5; profile=ci-synthetic; tests=18/18; approval=pass; public_posts=0; canary=not-promoted` is a valid pre-production receipt.

## Resources

- [Hootsuite Developer Portal](https://developer.hootsuite.com/)
- [Hootsuite REST API Reference](https://developer.hootsuite.com/docs/api)
- [GitHub Actions Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets)

## Next Steps

For deployment, see `hootsuite-deploy-integration`.

Wersje

W bazie nie ma innych skilli o nazwie hootsuite-ci-integration.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 28.10.2026 · wersja paczki 19a7aa1f6606 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100hootsuite-deploy-integration
    Wdraża integracje Hootsuite na Vercel, Fly.io i Cloud Run, konfiguruje sekrety platform i potoki wdrożeniowe.
  • 100hex-ci-integration
    Konfiguruje integrację Hex z CI/CD w GitHub Actions oraz automatyczne testy w potoku budowania.
  • 100perplexity-ci-integration
    Konfiguruje integrację Perplexity z CI/CD w GitHub Actions oraz automatyczne testy w procesie budowania.
  • 100windsurf-ci-integration
    Konfiguruje integrację Windsurf z CI/CD w GitHub Actions, w tym automatyczne testy i potoki budowania.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.