-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Detect contributors for squashed commits (#813)
- Loading branch information
Showing
5 changed files
with
65 additions
and
40 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -14,23 +14,23 @@ | |
|
||
Code | ||
extract_newsworthy_items( | ||
"- blop (#42)\n\nCo-authored-by: Person (<[email protected]>)\nCo-authored-by: Someone Else (<[email protected]>)") | ||
"- blop\n\nCo-authored-by: Person (<[email protected]>)\nCo-authored-by: Someone Else (<[email protected]>)") | ||
Output | ||
# A tibble: 1 x 4 | ||
description type breaking scope | ||
<chr> <chr> <lgl> <lgl> | ||
1 blop (@person, @else, #42). Uncategorized FALSE NA | ||
description type breaking scope | ||
<chr> <chr> <lgl> <lgl> | ||
1 blop (@person, @else). Uncategorized FALSE NA | ||
|
||
--- | ||
|
||
Code | ||
extract_newsworthy_items( | ||
"feat: blop (#42)\n\nCo-authored-by: Person (<[email protected]>)") | ||
"feat: blop\n\nCo-authored-by: Person (<[email protected]>)") | ||
Output | ||
# A tibble: 1 x 4 | ||
description type breaking scope | ||
<chr> <chr> <lgl> <lgl> | ||
1 blop (@person, #42) Features FALSE NA | ||
description type breaking scope | ||
<chr> <chr> <lgl> <lgl> | ||
1 blop (@person) Features FALSE NA | ||
|
||
# Can parse PR merge commits | ||
|
||
|
@@ -99,3 +99,14 @@ | |
} | ||
] | ||
|
||
# Can parse PR squash commits - linked issues | ||
|
||
[ | ||
{ | ||
"description": "improve bump_version() (error) messages (#153, cynkra/dm#325, #328).", | ||
"type": "Features", | ||
"breaking": false, | ||
"scope": "NA" | ||
} | ||
] | ||
|
This file contains 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 |
---|---|---|
|
@@ -13,7 +13,6 @@ | |
obsolete now. | ||
|
||
Reviewed-by: Z | ||
Refs: #123 | ||
|
||
## Features | ||
|
||
|
This file contains 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 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 |
---|---|---|
|
@@ -46,13 +46,13 @@ test_that("Can parse Co-authored-by", { | |
|
||
expect_snapshot( | ||
extract_newsworthy_items( | ||
"- blop (#42)\n\nCo-authored-by: Person (<[email protected]>)\nCo-authored-by: Someone Else (<[email protected]>)" | ||
"- blop\n\nCo-authored-by: Person (<[email protected]>)\nCo-authored-by: Someone Else (<[email protected]>)" | ||
) | ||
) | ||
|
||
expect_snapshot( | ||
extract_newsworthy_items( | ||
"feat: blop (#42)\n\nCo-authored-by: Person (<[email protected]>)" | ||
"feat: blop\n\nCo-authored-by: Person (<[email protected]>)" | ||
) | ||
) | ||
}) | ||
|
@@ -134,3 +134,16 @@ test_that("Can parse PR merge commits - other error", { | |
) | ||
}) | ||
}) | ||
|
||
test_that("Can parse PR squash commits - linked issues", { | ||
withr::local_envvar("FLEDGE_TEST_GITHUB_SLUG" = "cynkra/fledge") | ||
|
||
with_mock_dir("pr2", { | ||
withr::local_envvar("FLEDGE_YES_INTERNET_TEST" = "yes") | ||
withr::local_envvar("FLEDGE_TEST_SCOPES" = "bla") | ||
withr::local_envvar("GITHUB_PAT" = "ghp_111111111111111111111111111111111111111") | ||
expect_snapshot_tibble( | ||
extract_newsworthy_items("feat: blop (#328)\n") | ||
) | ||
}) | ||
}) |