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

Allow setting Github team/more individuals to get tagged when publishing #59

Closed
luispadron opened this issue Oct 23, 2023 · 14 comments
Closed
Labels
enhancement New feature or request

Comments

@luispadron
Copy link

A request regarding the information in: https://github.com/bazel-contrib/publish-to-bcr#a-note-on-release-automation.

As I understand it, we'd need to set a single GitHub user in config.yml in order to have tagging from the BCR PR to work correctly. That field also seems to configure the token used for the fork/PR, what we'd like:

  • Use the GitHub action bot to create the PR, don't mind if thats the associated committer (since GitHub teams can't be commit authors)
  • Allow setting list of other GitHub individuals/teams to tag on the BCR PR
@kormide
Copy link
Collaborator

kormide commented Oct 23, 2023

Use the GitHub action bot to create the PR, don't mind if thats the associated committer (since GitHub teams can't be commit authors)

The Publish to BCR app bot is always the creator of the pull request. I'm assuming that's in line with what you meant here?

Allow setting list of other GitHub individuals/teams to tag on the BCR PR

I see. So you would like to just tag arbitrary people on the PR but continue to use your main org's fork of the BCR for the source of the pull requests?

@luispadron
Copy link
Author

The Publish to BCR app bot is always the creator of the pull request. I'm assuming that's in line with what you meant here?

Sorry, yep thats what I meant.

I see. So you would like to just tag arbitrary people on the PR but continue to use your main org's fork of the BCR for the source of the pull requests?

Yeah exactly!

@luispadron luispadron changed the title Allow setting Github team as releaser Allow setting Github team/more individuals to get tagged when publishing Oct 23, 2023
@kormide
Copy link
Collaborator

kormide commented Oct 23, 2023

I see. So you would like to just tag arbitrary people on the PR but continue to use your main org's fork of the BCR for the source of the pull requests?

Yeah exactly!

That should be fairly easy to do and I think it's a useful thing to add. I'll label this as an enhancement and pick it up when I get the chance.

@kormide kormide added the enhancement New feature or request label Oct 23, 2023
@luispadron
Copy link
Author

Perfect, thanks for the quick response!

@kormide
Copy link
Collaborator

kormide commented Oct 23, 2023

In the meantime you can just continue to not set a fixedReleaser. The app should work—you just won't receive a notification for the pull requests or be notified of any errors.

@luispadron
Copy link
Author

Yep thats what were planning on doing over here: bazel-ios/rules_ios#780

@kormide
Copy link
Collaborator

kormide commented Oct 29, 2023

Rather than adding more configuration for additional taggers, I'm thinking that I will always tag everyone listed as a maintainer in metadata.json.

@luispadron
Copy link
Author

Makes sense to me!

@luispadron
Copy link
Author

Hm though in our case, it's a Google group email and not an actual GitHub account.

Would it email as well?

@kormide
Copy link
Collaborator

kormide commented Oct 29, 2023

Ah, looking at your metadata file:
https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/rules_ios/metadata.json#L3

There is another field for a maintainer that most other modules have, github, which points to the GitHub username of the maintainer. I'm not able to find docs on the schema, and I guess there isn't validation for that field since you don't have it for your module.

The idea was to send any error emails to the maintainer emails and tag their github handles in the PR comment. The latter won't work for your case since the group won't have a github user. You could add a github field and set an arbitrary user, but then only one person would be tagged and perhaps you wanted multiple. So maybe I do just need some additional configuration in config.yml to add additional users to be tagged..

@kormide
Copy link
Collaborator

kormide commented Oct 29, 2023

@meteorcloudy Is there a schema for the list of maintainers in metadata.json? Are the fields arbitrary?

@meteorcloudy
Copy link
Contributor

meteorcloudy commented Oct 30, 2023

Yeah, it should look like:

     [{"name": "John Cater", "email": "[email protected]"},
       {"name": "Yun Peng", "github": "meteorcloudy"}]

as it's described here: https://docs.google.com/document/d/1moQfNcEIttsk6vYanNKIy3ZuK53hQUFq1b1r0rmsYVg/edit#bookmark=id.1i90c6c14zvx

We probably should have a clearer specification documented. But for now, I think it's safe to assume name is mandatory, and either email or github has to be available.

@kormide
Copy link
Collaborator

kormide commented Nov 8, 2023

@luispadron I deployed the changes in #75, which will tag any maintainers with a github field in metadata.json in the BCR pull request. You could add any users you want to tag in addition to the group email that you already have.

I wanted to check if the above is sufficient for your use case, or if you think there's still a need for the other solution we discussed: a config.yml setting to just add additional github handles to tag in the pr.

@luispadron
Copy link
Author

luispadron commented Nov 8, 2023

I think that resolves this issue and it make sense it's not possible to tag non GitHub users.

I think in the future it would be nice to be able to receive email notifications for when BCR PRs are approved or require changes and such if folks want to manage this via a mailing list vs. maintaining this list.

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

No branches or pull requests

3 participants