question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: rule.tags

See original GitHub issue

Is your feature request related to a problem? Please describe.

I’d like to keep all my rules in one file (easier to maintain, and you know they will be run sequentially) I’d also like to run a subset of rules on occasion, rather than all of them, or likewise exclude certain groups of rules.

Describe the solution you’d like One solution would be to allow rules to have one or more ‘tags’

  - name: "Test rule"
    locations:
      - ~/Downloads
    filters:
      - extension: pdf
    actions:
      - shell: '~/bin/organize-pdf-handler "{path}"'
    tags:
      - home
      - nas_mounted

Then you could run a subset of rules…

organize run --include-tags home

Or exclude some

organize run --exclude-tags nas_mounted

Describe alternatives you’ve considered Maintaining seperate config files for the various scenarios. It would be complex and difficult to maintain, and probably require duplicated rules.

Additional context I’d also like to explore hooking organize up to inotify, in which case it would be useful to handle an inotify event and then trigger just the revelant rules, without running the entire ruleset.

Great tool by the way, thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tfeldmanncommented, Mar 31, 2022

v2.2.0 is out and includes tag support 🎉

Tagging your rules works like you described in your request. Then use the command line parameters --tags=foo,bar and --skip-tags=slow.

Documentation

1reaction
tfeldmanncommented, Mar 29, 2022

I think that would be really useful 👍 There is no way to run only certain tasks at the moment. This certainly goes on the todo list!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request --> apply settings based on tags. (Tag Rules)
What would be handy is to expand the tags feature and allow settings to be applied based on the tag.
Read more >
Historic Association of Tags when Creating a Rule - Feature Requests
Hi. When reviewing the new Rule creation method in LM, the use of the Tags has taken a more prominent role compared to...
Read more >
Allow certain tags to be made public | Feature Requests - Canny
Allow certain tags to be made public | Feature Requests | Canny. Currently, tags are only available for team admins. Users should be...
Read more >
Rules | Features | ObservePoint
Rules enable you to set custom parameters and test tag presence, variable presence, and data formatting of analytics and marketing tags against those...
Read more >
allow to set tags to items/triggers created by discovery rules
Feature request : allow to set tags to items/triggers created by discovery rules ... Currently tags cannot be set to items/triggers created by ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found