Skip to content

Commit

Permalink
Adding hasIssue hasLink to readme doc #7
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Nov 18, 2015
1 parent 5a857a9 commit fbb4559
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 35 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,25 @@ Changelog of Git Changelog.
## Next release
### Github [#7](https://github.com/tomasbjerre/git-changelog-lib/issues/7)

[91bf70d3f2a90f7](https://github.com/tomasbjerre/git-changelog-lib/commit/91bf70d3f2a90f7) Tomas Bjerre *2015-11-18 19:21:41*

Adding hasIssue hasLink to readme doc


## 1.3
### Github [#7](https://github.com/tomasbjerre/git-changelog-lib/issues/7)

[210e963a07b8a7b](https://github.com/tomasbjerre/git-changelog-lib/commit/210e963a07b8a7b) Tomas Bjerre *2015-11-18 19:06:00*

Adding booleans to check if link and/or issue exists in issue


### Other changes

[467d126c87b734e](https://github.com/tomasbjerre/git-changelog-lib/commit/467d126c87b734e) Tomas Bjerre *2015-11-18 19:17:48*

Adding new mediawiki screenshot

[49afd799253a777](https://github.com/tomasbjerre/git-changelog-lib/commit/49afd799253a777) Tomas Bjerre *2015-11-18 06:55:50*

Update README.md
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ The template is supplied with a datastructure like:
- commitTime
* issues
- name
- hasIssue
- issue
- hasLink
- link
* commits
- authorName
Expand All @@ -203,8 +205,10 @@ The template is supplied with a datastructure like:
- commitTime
* issues
- name
- issue
- link
- hasIssue
- issue
- hasLink
- link
* commits
- authorName
- authorEmailAddress
Expand Down
2 changes: 0 additions & 2 deletions changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
"jiraServer": "https://jiraserver/jira",
"jiraIssuePattern": "\\b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\\b",

"jiraIssuePattern": "\\b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\\b",

"customIssues": [
{"name": "Github", "pattern": "#([0-9]+)", "link": "https://github.com/tomasbjerre/git-changelog-lib/issues/${PATTERN_GROUP_1}" }
]
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/se/bjurr/gitchangelog/api/FakeRepo.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static FakeGitRepo fakeRepo() {
new GitCommit("Tomas B", "tomas.b@example", new Date(DAY_ZERO + TIME_DAY * 9), "Adding stuff JIR-1234", hashes
.get(8)))
.withCommit(
new GitCommit("T B", "tomas.b@example", new Date(DAY_ZERO + TIME_DAY * 10), "More stuff", hashes.get(9)));
new GitCommit("T B", "tomas.b@example", new Date(DAY_ZERO + TIME_DAY * 10), "More stuff #bug", hashes.get(9)));

fakeGitRepo.withTag(new GitTag("1.0", fakeGitRepo.getDiff(fromString(ZERO_COMMIT), fromString(hashes.get(5)))));

Expand Down
25 changes: 14 additions & 11 deletions src/test/resources/assertions/testIssuesAuthorsCommits.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Changelog of Git Changelog.

## Bugs
### T B
1970-01-11 00:00:00
More stuff


## Github [#12](https://github.com/tomasbjerre/git-releasenotes-plugin/issues/12)
### Tomas B
1970-01-06 00:00:00
Expand Down Expand Up @@ -33,17 +39,6 @@ Adding stuff


## No issue supplied
### T B
1970-01-11 00:00:00
More stuff

1970-01-07 00:00:00
This is 1.0 tagged commit

1970-01-05 00:00:00
Adding stuff


### Tomas B
1970-01-08 00:00:00
Adding stuff
Expand All @@ -52,6 +47,14 @@ Adding stuff
Adding stuff


### T B
1970-01-07 00:00:00
This is 1.0 tagged commit

1970-01-05 00:00:00
Adding stuff


### authorName
1970-01-01 00:00:00
First commit!
7 changes: 4 additions & 3 deletions src/test/resources/assertions/testIssuesCommits.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Changelog of Git Changelog.

## Bugs #bug
### T B - 1970-01-11 00:00:00
More stuff

## Github #12
### Tomas B - 1970-01-06 00:00:00
Adding stuff
Expand All @@ -23,9 +27,6 @@ Adding stuff
Adding stuff

## No issue supplied
### T B - 1970-01-11 00:00:00
More stuff

### Tomas B - 1970-01-08 00:00:00
Adding stuff

Expand Down
11 changes: 6 additions & 5 deletions src/test/resources/assertions/testTagsIssuesAuthorsCommits.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
Changelog of Git Changelog.

## No tag
### Bugs #bug
* T B
1970-01-11 00:00:00
More stuff


### Github #30
* T B
1970-01-09 00:00:00
Expand All @@ -16,11 +22,6 @@ Adding stuff


### No issue supplied
* T B
1970-01-11 00:00:00
More stuff


* Tomas B
1970-01-08 00:00:00
Adding stuff
Expand Down
7 changes: 4 additions & 3 deletions src/test/resources/assertions/testTagsIssuesCommits.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Changelog of Git Changelog.

## No tag
### Bugs #bug
1970-01-11 00:00:00
More stuff

### Github #30
1970-01-09 00:00:00
Adding stuff
Expand All @@ -12,9 +16,6 @@ Adding stuff
Adding stuff

### No issue supplied
1970-01-11 00:00:00
More stuff

1970-01-08 00:00:00
Adding stuff

Expand Down
7 changes: 4 additions & 3 deletions src/test/resources/assertions/testThatIssuesCanBeRemoved.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Changelog of Git Changelog.

## Bugs #bug
### T B - 1970-01-11 00:00:00
More stuff

## Github #12
### Tomas B - 1970-01-06 00:00:00
Adding stuff
Expand All @@ -23,9 +27,6 @@ Adding stuff
Adding stuff

## No issue supplied
### T B - 1970-01-11 00:00:00
More stuff

### Tomas B - 1970-01-08 00:00:00
Adding stuff

Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/settings/git-changelog-test-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"jiraIssuePattern": "\\b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\\b",

"customIssues": [
{"name": "Github", "pattern": "#([0-9]+)", "link": "https://github.com/tomasbjerre/git-releasenotes-plugin/issues/${PATTERN_GROUP_1}" }
{"name": "Github", "pattern": "#([0-9]+)", "link": "https://github.com/tomasbjerre/git-releasenotes-plugin/issues/${PATTERN_GROUP_1}" },
{ "name": "Bugs", "pattern": "#bug" }
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
Changelog of Git Changelog.

{{#issues}}
{{#hasIssue}}
{{#hasLink}}
## {{name}} [{{issue}}]({{link}})
{{/hasIssue}}
{{^hasIssue}}
{{/hasLink}}
{{^hasLink}}
## {{name}}
{{/hasIssue}}
{{/hasLink}}
{{#authors}}
### {{authorName}}
{{#commits}}
Expand Down

0 comments on commit fbb4559

Please # to comment.