Skip to content

Commit

Permalink
Restrict the CommentAnalyzer.kt only to the "I'm on it" magic words (I…
Browse files Browse the repository at this point in the history
  • Loading branch information
ILIYANGERMANOV authored Oct 9, 2023
1 parent 063a608 commit 06ed817
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
1 change: 0 additions & 1 deletion .idea/kotlinScripting.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@ import ivy.automate.base.github.model.GitHubUser

val TakeIssueIntentionPhrases = listOf(
"im on it",
"want to contribute",
"work on this",
"contribute on this",
"assign to me",
"assign this issue to me",
"assign this to me",
"give it a try",
"i take this"
"i am on it",
)

sealed interface CommentIntention {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,43 @@ class CommentAnalyzerTest : FreeSpec({
row("I'm on it", CommentIntention.TakeIssue(user)),
row("Im on it", CommentIntention.TakeIssue(user)),
row("im on it", CommentIntention.TakeIssue(user)),
row("want to contribute", CommentIntention.TakeIssue(user)),
row("I'm new to GitHub, can I work on this?", CommentIntention.TakeIssue(user)),
row("I am on it", CommentIntention.TakeIssue(user)),
row(
"I would like to work on this.",
"yeah i am on it, also i wanted to ask " +
"what resources should i use learn android",
CommentIntention.TakeIssue(user)
),
row("want to contribute", CommentIntention.Unknown),
row("I'm new to GitHub, can I work on this?", CommentIntention.Unknown),
row(
"I would like to work on this.",
CommentIntention.Unknown
),
row(
"Hi,\nI would like to work on this issue",
CommentIntention.TakeIssue(user)
CommentIntention.Unknown
),
row(
"I'm interested to contribute on this feature.",
CommentIntention.TakeIssue(user)
CommentIntention.Unknown
),
row(
"Sure, let me give it a try. Will keep posted here.",
CommentIntention.TakeIssue(user)
CommentIntention.Unknown
),
row(
"Hey @ILIYANGERMANOV , I want to work on this issue. Please assign it to me.\n",
CommentIntention.TakeIssue(user)
CommentIntention.Unknown
),
row(
"Hi @ILIYANGERMANOV, Assign this issue to me." +
"I think i will require some help in it from your side, " +
"so please bear with me.\n",
CommentIntention.TakeIssue(user)
CommentIntention.Unknown
),
row(
"Can I take this one?",
CommentIntention.TakeIssue(user)
CommentIntention.Unknown
),
) { (text, expectedIntention) ->
// given
Expand Down

0 comments on commit 06ed817

Please sign in to comment.