This repository was archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
feat: add comment-incentive command #840
Open
BeanieMen
wants to merge
17
commits into
ubiquity:development
Choose a base branch
from
BeanieMen:dev-6
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
00f7c85
feat: add comment-incentive command
BeanieMen 67a104c
feat: add comment-incentive command
BeanieMen c25a244
feat: add comment-incentive command
BeanieMen 036af33
feat: add comment-incentive command
BeanieMen 8946c73
feat: add incentivize command
BeanieMen a2beffe
feat: add incentivize command
BeanieMen bdd5fd0
Merge branch 'development' into dev-6
BeanieMen 83eaa6e
fix: incentivize command
BeanieMen 94f8b03
feat: add incentivize command
BeanieMen 6bf442b
feat: add comment-incentive command
BeanieMen 01d802b
feat: add comment-incentive command
BeanieMen 537ea77
feat: add comment-incentive command
BeanieMen 9052b78
feat: add comment-incentive command
BeanieMen 097c481
feat: add comment-incentive command
BeanieMen 6fef73f
Merge branch 'development' into dev-6
BeanieMen 48510f1
Update src/handlers/payout/post.ts
BeanieMen 44c5ccb
Update src/handlers/comment/handlers/comment-incentive.ts
BeanieMen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { getBotContext, getLogger } from "../../../bindings"; | ||
| import { Payload } from "../../../types"; | ||
|
|
||
| export const commentIncentive = async (body: string) => { | ||
| const context = getBotContext(); | ||
| const logger = getLogger(); | ||
| const payload = context.payload as Payload; | ||
| const sender = payload.sender.login; | ||
|
|
||
| logger.debug(`Received '/comment-incentive' command from user: ${sender}`); | ||
|
|
||
| if (!payload.issue) { | ||
| logger.info(`Skipping '/comment-incentive' because of no issue instance`); | ||
| return `Skipping '/comment-incentive' because of no issue instance`; | ||
| } | ||
| const toggle = (body.includes("true") || body.includes("false")) && body.match(/@([\w-]+)/g); | ||
| if (!toggle) { | ||
| return `invalid syntax for /comment-incentive \n usage /comment-incentive @user @user1... true|false \n ex /comment-incentive @user true`; | ||
| } else { | ||
| return; | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.