Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Extract contributor name from PR merge message #358

Merged
merged 9 commits into from
Jun 27, 2022

Conversation

maelle
Copy link
Member

@maelle maelle commented Jun 27, 2022

Fix #356
Part of #354

Copy link
Contributor

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, great!

R/update-news.R Outdated Show resolved Hide resolved
withr::local_envvar("FLEDGE_TEST_GITHUB_SLUG" = "cynkra/fledge")
httptest::with_mock_dir("pr", {
withr::local_envvar("GITHUB_PAT" = "ghp_111111111111111111111111111111111111111")
expect_snapshot(extract_newsworthy_items("Merge pull request #18 from someone/conventional-parsing"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect_snapshot(extract_newsworthy_items("Merge pull request #18 from someone/conventional-parsing"))
expect_snapshot({
extract_newsworthy_items("Merge pull request #18 from someone/conventional-parsing") %>%
jsonlite::toJSON(pretty = TRUE, na = "string")
})

Maybe worth adding a wrapper?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!! ✨

Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
@maelle maelle marked this pull request as ready for review June 27, 2022 08:59
@maelle maelle requested a review from krlmlr June 27, 2022 08:59
@maelle
Copy link
Member Author

maelle commented Jun 27, 2022

It's a bit surprising to me that adding a helper is needed, but I had no luck with expect_snapshot_value() (which didn't work) and expect_snapshot_output() has no transform argument. 🤔

Copy link
Contributor

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, can you please merge when green?

@maelle maelle merged commit 06fdf9b into main Jun 27, 2022
@maelle maelle deleted the adjust-parse_merge_commi branch June 27, 2022 09:40
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

update_news() tweaks
2 participants