Permalink
Browse files

added custom extractId to issue provider

  • Loading branch information...
milgner committed Jul 11, 2011
1 parent bd3a38c commit 8c024cabeea2b0b902551d6f255c70cdefa90a0d
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/com/marcusilgner/ghcity/GithubIssueProvider.java
@@ -6,6 +6,7 @@
import java.util.Map;
import java.util.regex.Pattern;
+import java.util.regex.Matcher;
/**
* An issue provider for Github issue tracker
@@ -34,4 +35,15 @@ protected Pattern compilePattern(@NotNull final Map<String, String> properties)
}
return result;
}
+
+ @Override
+ protected String extractId(@NotNull String match) {
+ Matcher matcher = myPattern.matcher(match);
+ matcher.find();
+ if (matcher.groupCount() >= 1) {
+ return matcher.group(1);
+ } else {
+ return super.extractId(match);
+ }
+ }
}

0 comments on commit 8c024ca

Please sign in to comment.