diff options
author | streetturtle <streetturtle@users.noreply.github.com> | 2020-09-21 20:53:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 20:53:22 -0400 |
commit | 31213af0082bef8344475dbeb84205f1a7e31c7d (patch) | |
tree | 2a8b4cad8363c5a0019466edf86d8ef99941d2f4 /bitbucket-widget | |
parent | a127ffe8efc8ccb91b7a8495c23f67278609df25 (diff) | |
parent | 21150bd640f086f617c61b32cde5e45ecfb5158f (diff) |
Merge pull request #188 from brucec5/widget-tweaks
Add customizable refresh timeouts to most widgets
Diffstat (limited to 'bitbucket-widget')
-rw-r--r-- | bitbucket-widget/README.md | 1 | ||||
-rw-r--r-- | bitbucket-widget/bitbucket.lua | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/bitbucket-widget/README.md b/bitbucket-widget/README.md index fbd21b1..a0cae0a 100644 --- a/bitbucket-widget/README.md +++ b/bitbucket-widget/README.md @@ -19,6 +19,7 @@ It is possible to customize widget by providing a table with all or some of the | `uuid` | Required | UUID | | `workspace` | Required | Workspace ID| | `repo_slug` | Required | Repository slug | +| `timeout` | 60 | How often in seconds the widget refreshes | ## Installation diff --git a/bitbucket-widget/bitbucket.lua b/bitbucket-widget/bitbucket.lua index 18ab571..b871d6e 100644 --- a/bitbucket-widget/bitbucket.lua +++ b/bitbucket-widget/bitbucket.lua @@ -76,6 +76,7 @@ local function worker(args) local uuid = args.uuid or show_warning('UUID is not set') local workspace = args.workspace or show_warning('Workspace is not set') local repo_slug = args.repo_slug or show_warning('Repo slug is not set') + local timeout = args.timeout or 60 local current_number_of_prs @@ -267,7 +268,7 @@ local function worker(args) ) watch(string.format(GET_PRS_CMD, host, workspace, repo_slug, uuid, uuid), - 60, update_widget, bitbucket_widget) + timeout, update_widget, bitbucket_widget) return bitbucket_widget end |