---
title: "GitHub कनेक्टर"
description: "Tajo के माध्यम से GitHub repository events, issues, pull requests, और developer activity को Brevo के साथ sync करने की संपूर्ण integration guide।"
url: https://tajo.io/hi/docs/connectors/custom/github/
markdown: https://tajo.io/hi/docs/connectors/custom/github.md
lang: hi-IN
robots: noindex
---

अर्ली एक्सेस का अनुरोध करें

अपना पहला नाम और कार्यस्थल का ईमेल पता दर्ज करें। Tajo एक्सेस अनुरोध की पुष्टि के लिए हम आपको एक लिंक ईमेल करेंगे।

# GitHub कनेक्टर

कनेक्टर की स्थिति: नियोजित अभी बना नहीं है। Tajo आज यह कनेक्टर नहीं चलाता।

| स्रोत फ़ील्ड | गंतव्य फ़ील्ड | नमूना मान |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

developer engagement tracking, release notification workflows, और community activity monitoring के लिए अपने GitHub repositories को Tajo के माध्यम से Brevo से कनेक्ट करें।

## अवलोकन

| Property | Value |
| --- | --- |
| **Platform** | GitHub |
| **Category** | Custom |
| **Setup Complexity** | Moderate |
| **Official Integration** | No |
| **Data Synced** | Events, Users, Repositories |
| **API Type** | REST API, GraphQL API |
| **Authentication** | GitHub App / Personal Access Token / OAuth 2.0 |
| **Base URL** | `https://api.github.com` |
| **API Version** | `2022-11-28` (header-based versioning) |

## विशेषताएं

- **Issue और PR tracking** - issue और pull request events को Brevo contact timelines में sync करें
- **Release notifications** - नए repository releases पर Brevo campaigns trigger करें
- **Contributor sync** - community engagement के लिए GitHub contributors को Brevo contacts से map करें
- **Star और fork tracking** - repository popularity metrics monitor करें
- **Webhook event forwarding** - GitHub events को Brevo automations में forward करें
- **Repository catalog** - repository metadata को Brevo catalog items के रूप में sync करें

## पूर्वावश्यकताएं

शुरू करने से पहले, सुनिश्चित करें कि आपके पास हैं:

1. target repositories तक access वाला एक GitHub account
2. एक GitHub App या Personal Access Token (fine-grained अनुशंसित)
3. webhook configuration के लिए repositories का admin access
4. API access वाला एक Brevo account
5. सक्रिय subscription वाला एक Tajo account

## प्रमाणीकरण

GitHub कई authentication methods को support करता है। Tajo organization-level access के लिए GitHub Apps का उपयोग करने की अनुशंसा करता है।

### विकल्प 1: GitHub App (अनुशंसित)

1. **Settings** > **Developer settings** > **GitHub Apps** पर जाएं
2. **New GitHub App** पर क्लिक करें
3. इन permissions के साथ app कॉन्फ़िगर करें:

```
Repository permissions:
  Issues: Read
  Pull requests: Read
  Contents: Read
  Metadata: Read

Organization permissions:
  Members: Read

Subscribe to events:
  Issues
  Pull request
  Push
  Release
  Star
  Fork
```

### विकल्प 2: Fine-Grained Personal Access Token

1. **Settings** > **Developer settings** > **Personal access tokens** > **Fine-grained tokens** पर जाएं
2. **Generate new token** पर क्लिक करें
3. target repositories चुनें
4. ये permissions दें:

```
Repository access: Selected repositories
Permissions:
  Issues: Read-only
  Pull requests: Read-only
  Contents: Read-only
  Metadata: Read-only
```

Token Security

Fine-grained tokens की expiration dates होती हैं। expiry से पहले token rotation सेट करें। GitHub App installation tokens auto-refresh होते हैं और production use के लिए बेहतर हैं।

### Tajo से कनेक्ट करना

```bash
# GitHub App का उपयोग
tajo connectors install github \
  --app-id $GITHUB_APP_ID \
  --private-key-path ./github-app-key.pem \
  --installation-id $GITHUB_INSTALLATION_ID

# Personal Access Token का उपयोग
tajo connectors install github \
  --token $GITHUB_TOKEN
```

## कॉन्फ़िगरेशन

### बेसिक सेटअप

```yaml
connectors:
  github:
    enabled: true
    auth_type: "github_app"  # or "token"

    repositories:
      - owner/repo-1
      - owner/repo-2

    sync:
      issues: true
      pull_requests: true
      releases: true
      contributors: true
      stars: true

    lists:
      contributors: 20
      stargazers: 21
```

### Field Mapping

GitHub user data को Brevo contact attributes से map करें:

```yaml
field_mapping:
  # Standard fields
  login: GITHUB_USERNAME
  email: email
  name: FIRSTNAME

  # Developer metrics
  contributions: GITHUB_CONTRIBUTIONS
  repositories_count: GITHUB_REPOS
  followers: GITHUB_FOLLOWERS
  created_at: GITHUB_JOINED

  # Custom attributes
  company: COMPANY
  location: LOCATION
  bio: GITHUB_BIO
```

## API Endpoints

Tajo निम्नलिखित GitHub REST API endpoints के साथ integrate करता है:

| Endpoint | Method | उद्देश्य |
| --- | --- | --- |
| `/repos/{owner}/{repo}/issues` | GET | repository issues list करें |
| `/repos/{owner}/{repo}/pulls` | GET | pull requests list करें |
| `/repos/{owner}/{repo}/releases` | GET | releases list करें |
| `/repos/{owner}/{repo}/contributors` | GET | contributors list करें |
| `/repos/{owner}/{repo}/stargazers` | GET | stargazers list करें |
| `/repos/{owner}/{repo}/forks` | GET | forks list करें |
| `/repos/{owner}/{repo}/events` | GET | repository events list करें |
| `/users/{username}` | GET | user profile प्राप्त करें |
| `/orgs/{org}/members` | GET | organization members list करें |
| `/repos/{owner}/{repo}/hooks` | POST | webhook बनाएं |

## कोड उदाहरण

### कनेक्टर शुरू करें

```javascript
import { TajoClient } from '@tajo/sdk';

const tajo = new TajoClient({
  apiKey: process.env.TAJO_API_KEY,
  brevoApiKey: process.env.BREVO_API_KEY
});

await tajo.connectors.connect('github', {
  appId: process.env.GITHUB_APP_ID,
  privateKey: process.env.GITHUB_PRIVATE_KEY,
  installationId: process.env.GITHUB_INSTALLATION_ID
});
```

### Contributors को Brevo से Sync करें

```javascript
await tajo.connectors.sync('github', {
  type: 'full',
  resources: ['contributors'],
  repositories: ['owner/repo-1', 'owner/repo-2']
});

const status = await tajo.connectors.status('github');
console.log(status);
// {
//   connected: true,
//   lastSync: '2024-03-15T11:00:00Z',
//   contributorsCount: 245,
//   issuesTracked: 1890,
//   releasesTracked: 34
// }
```

### Webhook Events हैंडल करें

```javascript
app.post('/webhooks/github', async (req, res) => {
  const signature = req.get('X-Hub-Signature-256');
  const event = req.get('X-GitHub-Event');

  // webhook signature सत्यापित करें
  if (!verifyGitHubSignature(req.body, signature)) {
    return res.status(401).send('Unauthorized');
  }

  await tajo.connectors.handleWebhook('github', {
    event,
    payload: req.body
  });

  res.status(200).send('OK');
});
```

### Release Campaign Trigger करें

```javascript
// नए releases सुनें और Brevo campaign trigger करें
tajo.connectors.on('github', 'release.published', async (event) => {
  await tajo.campaigns.trigger('release-announcement', {
    listId: 21,
    params: {
      version: event.release.tag_name,
      release_notes: event.release.body,
      download_url: event.release.html_url
    }
  });
});
```

## Rate Limits

GitHub authentication method के आधार पर rate limits लागू करता है:

| Authentication | Primary Rate Limit | Search API |
| --- | --- | --- |
| **Unauthenticated** | 60 requests/hour | 10 requests/minute |
| **Personal Access Token** | 5,000 requests/hour | 30 requests/minute |
| **GitHub App (installation)** | 5,000 requests/hour | 30 requests/minute |
| **GitHub App (user-to-server)** | 5,000 requests/hour | 30 requests/minute |

Conditional Requests

Tajo API consumption कम करने के लिए conditional requests (`If-None-Match` / `If-Modified-Since` headers) का उपयोग करता है। `304 Not Modified` वाले responses rate limits में नहीं गिने जाते।

अतिरिक्त limits:

- **Secondary rate limits**: 100 से अधिक concurrent requests नहीं। REST API endpoints के लिए प्रति minute 900 points से अधिक नहीं।
- **GraphQL**: 5,000 points प्रति घंटा (query cost complexity के अनुसार भिन्न होती है)।

## समस्या निवारण

### सामान्य समस्याएं

| समस्या | कारण | समाधान |
| --- | --- | --- |
| 401 Unauthorized | Expired token या गलत credentials | token पुनः generate करें या GitHub App पुनः install करें |
| 403 Forbidden | अपर्याप्त permissions | token scopes या App permissions की जांच करें |
| 404 Not Found | access के बिना private repo | token या App को repository access दें |
| Rate limit exceeded | बहुत अधिक API calls | conditional requests enable करें और sync frequency कम करें |
| Webhooks प्राप्त नहीं हुए | गलत URL या firewall | सत्यापित करें कि webhook URL सार्वजनिक रूप से accessible है |

### Debug Mode

```yaml
connectors:
  github:
    debug: true
    log_level: verbose
    log_webhooks: true
```

### Connection Test करें

```bash
tajo connectors test github
# ✓ API authentication successful
# ✓ Repository access verified
# ✓ Issue data readable
# ✓ Webhook delivery active
# ✓ Rate limit healthy (4,850/5,000 remaining)
```

## सर्वोत्तम प्रथाएं

1. **PATs के बजाय GitHub Apps का उपयोग करें** - GitHub Apps granular permissions और auto-refreshing tokens प्रदान करते हैं
2. **Webhook secrets enable करें** - हमेशा HMAC-SHA256 के साथ webhook signatures सत्यापित करें
3. **Conditional requests का उपयोग करें** - rate limit quota बर्बाद करने से बचने के लिए ETags का लाभ उठाएं
4. **बड़े responses को paginate करें** - GitHub प्रति page अधिकतम 100 items लौटाता है; `Link` headers के साथ iterate करें
5. **कम गतिविधि के दौरान sync करें** - peak development hours के बाहर full syncs schedule करें
6. **Rate limit headers monitor करें** - सक्रिय रूप से throttle करने के लिए `X-RateLimit-Remaining` की जांच करें

## सुरक्षा

- **GitHub App Authentication** - short-lived installation tokens के साथ RSA key-आधारित JWT
- **Webhook Signatures** - सभी webhook payloads पर HMAC-SHA256 signature verification
- **Fine-Grained Tokens** - विशिष्ट repositories और permissions तक scoped
- **HTTPS Only** - सभी API communication TLS 1.2+ के माध्यम से encrypted
- **Encrypted Storage** - Private keys और tokens Tajo में at rest encrypted
- **Token Expiration** - Fine-grained tokens auto-expire होते हैं; rotation alerts सेट करें

## संबंधित संसाधन

- [Jira कनेक्टर](https://tajo.io/hi/docs/connectors/custom/jira)
- [Linear कनेक्टर](https://tajo.io/hi/docs/connectors/custom/linear)
- [Notion कनेक्टर](https://tajo.io/hi/docs/connectors/custom/notion)
- [Brevo Contacts API](https://tajo.io/hi/docs/contact-management)
