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

Check for newest CoC at release #1484

Closed
kellijohnson-NOAA opened this issue Sep 15, 2021 · 6 comments
Closed

Check for newest CoC at release #1484

kellijohnson-NOAA opened this issue Sep 15, 2021 · 6 comments

Comments

@kellijohnson-NOAA
Copy link

First, thank you for all of your hard work on usethis, it is a great package.

Brief description of the problem

I noticed that the Code of Conduct that is stored in the templates directory is not up to date with the latest version, i.e., version 2.0 instead of version 2.1. The latest version available from EthicalSource is always available on their GitHub site.

Potential solution

Instead of

new <- use_template(
"CODE_OF_CONDUCT.md",
save_as = save_as,
data = list(contact = contact),
ignore = is_package() && is.null(path)
)
you could read the text directly from the following link

https://github.com/EthicalSource/contributor_covenant/blob/release/CODE_OF_CONDUCT.md

which always has the latest version.

I think that it might also be a good idea to create a test in usethis that would alert usethis developers when the version has changed. I am not sure how often users of usethis should update their Code of Conduct within their package or project. I looked on the issue list for Contributor Covenant and found a few requests, e.g., 871 and 167, to facilitate updating to the newest version upon release but I don't know if that is a good idea or not.

Thank you for implementing a Code of Conduct and facilitating others to do so as well.

@jennybc
Copy link
Member

jennybc commented Sep 15, 2021

Interesting idea. I am somewhat hesitant to have live download of something we don't control, as it also means that if the content disappears or moves, now our function doesn't work. I'm pretty sure we have had to fiddle with this link in the past for these reasons.

One alternative that partially mitigates the original problem is to add a custom release bullet reminding us to check for CoC updates every time we release. This might be the right compromise.

@kellijohnson-NOAA
Copy link
Author

Thanks @jennybc for the alternative. Would there be a way for others to easily add the check as well? I find that I have good intentions of keeping things up to date but just don't have the bandwidth to do things by memory.

@jennybc
Copy link
Member

jennybc commented Sep 15, 2021

The general mechanism for leaving yourself reminders like this, in the devtools world, is to have an unexported function that returns the nudges:

https://devtools.r-lib.org/reference/release.html#details

You can add arbitrary extra questions by defining an (un-exported) function called release_questions() that returns a character vector of additional questions to ask.

If you do that, both devtools::release() and usethis::use_release_issue() will include your custom release checks along with the standard ones.

@kellijohnson-NOAA
Copy link
Author

Brilliant. Thanks for sharing and for the discussion regarding updating the Code of Conduct.

@jennybc jennybc changed the title Feature: automatically pull newest version of Code of Conduct Check for newest CoC at release Sep 28, 2021
@jennybc
Copy link
Member

jennybc commented Sep 28, 2021

I think we should add a release bullet to check for latest CoC, if project has a CoC. Or maybe just a nudge to rerun use_code_of_conduct()?

@hadley
Copy link
Member

hadley commented Oct 1, 2021

I think usethis itself should gain a bullet that remind us to update the CoC, but for other packages I think this is better to do as part of spring cleaning, not routinely with every release.

@jennybc jennybc closed this as completed in 2402ea8 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants