Một mục tập trung tự động hoá trong kho dữ liệu GitHub của TopGit: hubotio/hubot, 16.8k sao, nhóm Automation, JavaScript. A customizable life embetterment robot.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Note: v10.0.4 accidentally contains the removal of CoffeeScript; v10.0.5 puts it back inNote: v11 removes CoffeeScript and converts this codebase to ESM
Hubot is a framework to build chat bots, modeled after GitHub's Campfire bot of the same name, hubot.
He's pretty cool. He's extendable with scripts and can work
on many different chat services.
This repository provides a library that's distributed by npm that you
use for building your own bots. See the documentation
for details on getting up and running with your very own robot friend.
In most cases, you'll probably never have to hack on this repo directly if you
are building your own bot. But if you do, check out CONTRIBUTING.md
Create your own Hubot instance
This will create a directory called myhubot in the current working directory.
Review scripts/example.mjs. Create more scripts in the scripts folder.
Command bus (robot.commands)
Hubot includes a deterministic command subsystem for slash-style commands. It is safe by default and does not interfere with legacy hear and respond listeners.
Commands that declare side effects will require confirmation before execution.
The user is asked to confirm. They do so like so:
@hubot yes
@hubot no
@hubot cancel
Aliases are for discovery and search only. They do not execute commands or create proposals. They are intent utterances.
Built-in Help Command
Hubot automatically registers a help command that provides command discovery and documentation:
@hubot help # List all commands
@hubot help tickets # Filter commands by prefix
@hubot help search "create ticket" # Search by keyword, alias, description, or example
Control who can execute commands using room-based and role-based permissions.
Room-Based Permissions
Restrict command execution to specific chat rooms:
robot.commands.register({
id: 'sensitive.action',
description: 'Admin-only action',
permissions: {
rooms: ['#admin', '#ops'] // Only allowed in these rooms
},
handler: async (ctx) => {
return 'Action executed!'
}
})
Users in other rooms get: Permission denied: command not allowed in this room
Role-Based Permissions
Restrict command execution to users with specific roles:
robot.commands.register({
id: 'deploy.production',
description: 'Deploy to production',
permissions: {
roles: ['admin', 'devops'] // Only users with these roles
},
handler: async (ctx) => {
return 'Deploying...'
}
})
To enable role checking, provide a permissionProvider when creating CommandBus:
const commandBus = new CommandBus(robot, {
permissionProvider: {
hasRole: async (user, requiredRoles, context) => {
// Custom logic to check if user has any of the required roles
const userRoles = await fetchUserRoles(user.id)
return requiredRoles.some(role => userRoles.includes(role))
}
}
})
Without a permission provider, role-based permissions are ignored (allow by default). Room-based permissions are always enforced.
License
See the LICENSE file for license rights and limitations (MIT).
Hubot History
Say hello to Hubot
Cartoon with Hubot
The Most Important Startup's Hardest Worker Isn't a Person
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/hubotio/hubot là nguồn chính thức.
hubotio/hubot có bao nhiêu sao?
hubotio/hubot có 16.8k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/hubotio/hubot. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
hubotio/hubot có những chủ đề gì?
GitHub topics của hubotio/hubot: "bot", "chat", "hubot". TopGit xếp repo vào nhóm Automation.
hubotio/hubot có trang demo không?
Dự án có trang chủ ở https://hubotio.github.io/hubot/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
hubotio/hubot còn đang phát triển không?
Commit gần nhất trên hubotio/hubot là 20 ngày trước (theo timestamp GitHub). Repo có 3.7k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
hubotio/hubot dùng license gì?
hubotio/hubot phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
hubotio/hubot viết bằng ngôn ngữ gì?
hubotio/hubot chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về hubot?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về hubot.