-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add patchset-notified event #33
Conversation
This patch adds patchset-notified event. It is a extended event defined by 'Gerrit Notify PatchSet Plugin'. https://github.com/rinrinne/gerrit-notify-patchset
public void fromJson(JSONObject json) { | ||
super.fromJson(json); | ||
if (json.containsKey(NOTIFIER)) { | ||
this.account = new Account(json.getJSONObject(NOTIFIER)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure overwriting the account field is "good". But at the same time I'm not sure exactly what the account field is about. Is it the owner of the change or the user who initialized the event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
account filed was created by the below commit
dd351e2
All events except ref-updated has account attribute, Key name is e.g. abandoner, uploader, submitter, and so on. By the above patch, those were refactored then stored into one field named account.
This account is the person who did something operation which causes event on Gerrit. In my plugin case, it is the person who pushed Notify
button on revision page.
So I think it is proper to store account attribute in notifier
key into account field.
Just in case, I confirmed no one sets value to account field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, great
I think we can go with this for now, its a bit on the edge since its not a "Gerrit core" event type. As we've discussed before; some kind of extensability to GerritEventType should be made, but this could work for now. I would like to hold off on merging this though until 2.13 of the Gerrit Trigger is out of beta. Or maybe I should just start branching... |
Agree:+1: |
Released in 2.7.0 |
This patch adds patchset-notified event.
It is a extended event defined by 'Gerrit Notify PatchSet Plugin'.
https://github.com/rinrinne/gerrit-notify-patchset