renable contrib badge bot, with optional commenting #656
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As part of the community teams catchup last week, we identified a few areas for improving the core contributions experience - one of which being automatically adding the contrib badge to Our profiles. Despite several in attendance having also been at the 2019 retreat, we forgot that this had been tackled already.
The automation code was disabled by a feature flag, most likely because at the time it was added, few Our profiles would have had the GitHub account linked. That's no longer the case, so we figured it's safe to turn it back on. To make it a bit safer, I've added an additional app setting to disable comments - this means the bot can be enabled silently, if we want to turn it on and monitor it for a while, without firing off comments to PRs.
For that to work, the web config needs two new app settings added (file is excluded from source control). Keys are:
Everything else is largely unchanged - I tweaked the comment text a little and updated a couple of variable names, nothing major. Added a null-check in MarkAsSolutionReminder because it kept throwing errors on local.