| |
@@ -19,15 +19,7 @@
|
| |
label = 'Updates Ready for Stable'
|
| |
position = "right"
|
| |
hidden_if_empty = True
|
| |
- parameters = [
|
| |
- dict(
|
| |
- name="username",
|
| |
- label="Username",
|
| |
- default=None,
|
| |
- validator=validators.Username,
|
| |
- help="A FAS username.",
|
| |
- )]
|
| |
-
|
| |
+ hub_types = ['stream']
|
| |
|
| |
class BaseView(RootWidgetView):
|
| |
|
| |
@@ -36,7 +28,7 @@
|
| |
def get_context(self, instance, *args, **kwargs):
|
| |
get_pending = GetPending(instance)
|
| |
context = dict(
|
| |
- username=instance.config["username"],
|
| |
+ username = instance.hub.name,
|
| |
)
|
| |
context.update(get_pending())
|
| |
return context
|
| |
@@ -51,7 +43,7 @@
|
| |
class GetPending(CachedFunction):
|
| |
|
| |
def execute(self):
|
| |
- username = self.instance.config["username"]
|
| |
+ username = self.instance.hub.name
|
| |
# First, get all of my updates currently in testing.
|
| |
bodhiurl = 'https://bodhi.fedoraproject.org/updates/'
|
| |
query = '?user={username}&status=testing'.format(username=username)
|
| |
@@ -88,7 +80,7 @@
|
| |
if not message['topic'].endswith('bodhi.update.comment'):
|
| |
return False
|
| |
if giveaway in message['msg']['comment']['text']:
|
| |
- username = self.instance.config['username']
|
| |
+ username = self.instance.hub.name
|
| |
if username == message['msg']['comment']['update_submitter']:
|
| |
return True
|
| |
return False
|
| |
make updates2stable only show on stream page, and
link it to the user of the stream, rather than a
config value.