@anjir/app-gitlab
Version:
GitLab App for ANJIR automation platform - اتصال GitLab به بیش از 1000+ برنامه و خودکارسازی فرآیندهای کاری با مدیریت پروژههای توسعه نرمافزار
58 lines (55 loc) • 2.83 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.gitlab = exports.gitlabAuth = void 0;
const tslib_1 = require("tslib");
const apps_common_1 = require("@anjir/apps-common");
const apps_framework_1 = require("@anjir/apps-framework");
const shared_1 = require("@anjir/shared");
const create_issue_action_1 = require("./lib/actions/create-issue-action");
const issue_event_1 = require("./lib/trigger/issue-event");
exports.gitlabAuth = apps_framework_1.PieceAuth.OAuth2({
description: `
**اتصال GitLab به ANJIR:**
با اتصال GitLab به پلتفرم ANJIR، میتوانید:
• پروژهها و issues را بین GitLab و سایر برنامهها همگامسازی کنید
• فرآیندهای کاری تکراری را خودکار کنید
• مدیریت پروژههای توسعه نرمافزار را بهبود بخشید
**مراحل راهاندازی:**
1. وارد [GitLab](https://gitlab.com/) شوید
2. به **User Settings** > **Applications** بروید
3. روی **New Application** کلیک کنید
4. نام برنامه را وارد کنید (مثال: ANJIR Integration)
5. **Redirect URI** را به https://app.anjirauto.com/redirect تنظیم کنید
6. **Scopes** زیر را انتخاب کنید:
- api (دسترسی کامل به API)
- read_user (خواندن اطلاعات کاربر)
7. روی **Save application** کلیک کنید
8. **Application ID** و **Secret** را کپی کرده و در فیلدهای زیر وارد کنید`,
required: true,
authUrl: 'https://gitlab.com/oauth/authorize',
tokenUrl: 'https://gitlab.com/oauth/token',
scope: ['api', 'read_user'],
});
exports.gitlab = (0, apps_framework_1.createPiece)({
displayName: 'GitLab',
description: 'اتصال GitLab به بیش از 1000+ برنامه و خودکارسازی فرآیندهای کاری با مدیریت پروژههای توسعه نرمافزار',
auth: exports.gitlabAuth,
minimumSupportedRelease: '0.30.0',
logoUrl: 'https://cdn.anjirauto.com/apps/gitlab.png',
categories: [shared_1.PieceCategory.DEVELOPER_TOOLS],
authors: ["kishanprmr", "MoShizzle", "khaledmashaly", "abuaboud"],
actions: [
create_issue_action_1.createIssueAction,
(0, apps_common_1.createCustomApiCallAction)({
baseUrl: () => 'https://gitlab.com/api/v4',
auth: exports.gitlabAuth,
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return ({
Authorization: `Bearer ${auth.access_token}`,
});
}),
}),
],
triggers: [issue_event_1.issuesEventTrigger],
});
//# sourceMappingURL=index.js.map
;