85adab7
@@ -26,9 +26,9 @@
topics:
- "%(topic)s" # The topic of the message that triggered us.
users:
- - "%(msg.commit.username)s"
+ - "%(msg.agent)s"
operation: count
condition:
greater than or equal to: 1
- recipient: "%(msg.commit.username)s"
+ recipient: "%(msg.agent)s"
greater than or equal to: 10
greater than or equal to: 1000
greater than or equal to: 150
greater than or equal to: 50
greater than or equal to: 500
@bex mentioned that the pagure badges were broken. It seems like the pagure message format may have changed at some point in the past, and these rules were never updated to match the new format.
See an example message here: https://apps.fedoraproject.org/datagrepper/id?id=2017-9c6f4d9f-577e-4347-829f-9952cd4b4ff3&is_raw=true&size=extra-large
rebased onto 85adab7
Should this PR address the "total_commits": 8, component of the message?
"total_commits": 8,
Also, this commit: https://apps.fedoraproject.org/datagrepper/id?id=2017-4febfb40-6ee1-4a9f-a05c-cad8d01ba4da&is_raw=true&size=extra-large has multiple authors and a different author from the agent.
Hoo boy, that's going to be tricky.
This will get tricky.
We can rebrand the badges to be about "how many times you have pushed to a dist-git repo" and call it a day.
Otherwise:
Further, take a look at this message (it is the same message you posted, but with an additional meta argument): https://apps.fedoraproject.org/datagrepper/id?id=2017-4febfb40-6ee1-4a9f-a05c-cad8d01ba4da&is_raw=true&size=extra-large&meta=usernames
meta
See that even though @stbuehler appears in the message, datagrepper only knows about @pingou's association with the event.
I am cool with counting pushes instead of commits. However, we need to count authors because, in the case of docs, not every author has commit/push rights.
Hoo boy, that's going to be tricky. This will get tricky. We can rebrand the badges to be about "how many times you have pushed to a dist-git repo" and call it a day.
The earlier version of pagure supported that. But, with the newer API it cannot distinguish between multiple authors.
@pingou ^^ as it sounds like we may need some pagure thinking here.
I thought there was a ticket to enhance the data provided in the fedmsg message but I'm not finding it.
If someone would want to adjust the hook, I'd review it :)
I'm marking this PR as blocked because of the external reasons mentioned above.
Metadata Update from @jflory7: - Pull-request tagged with: blocked - Request assigned
@pingou Almost a year has passed since this PR was opened – could Pagure support @ralph's change now? If not, I suggest we close this PR and reopen with a new PR when the fedora-messaging message support is there.
Metadata Update from @ralph: - Request reset
@pingou Almost a year has passed since this PR was opened – could Pagure support @ralph's change now?
It does not no :(
@pingou Thanks for the quick answer. I'm going to close this as stale.
Pull-Request has been closed by jflory7
@bex mentioned that the pagure badges were broken. It seems like the pagure
message format may have changed at some point in the past, and these rules were
never updated to match the new format.
See an example message here:
https://apps.fedoraproject.org/datagrepper/id?id=2017-9c6f4d9f-577e-4347-829f-9952cd4b4ff3&is_raw=true&size=extra-large