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

Support decoding --reviewers as plain-text JSON #330

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fheinecke
Copy link
Contributor

@fheinecke fheinecke commented Feb 11, 2025

The shared-workflows bot currently only supports decoding the --reviewers flag as a base64-encoded JSON string. For example, rather than

{
  "reviewer-group-1": {
    "username": {
        ... // Repeat for 100+ lines

the tool requires the value as ewogICJyZXZpZXdlci1ncm91cC0xIjogewogICAgInVzZXJuYW1lIjogewogICAgICAgIC4uLiAvLyBSZXBlYXQgZm9yIDEwMCsgbGluZXMK.... For those of us who cannot base64-decode a string in their head, this is really difficult to read and debug.

Previously this was needed because GHA environment variables/secrets do not "play nice" with structured multiline data. However, now that we're starting to use env-loader for these values, we can support plain-text JSON without issue.

This change is fully backwards compatible with all current uses of the bot.

@fheinecke fheinecke requested a review from a team as a code owner February 11, 2025 18:33
Copy link
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

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

Should this have test coverage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants