Keep your label automations
Goal
Your team already runs deploys with labels: someone adds ready-to-deploy, a Jira Automation rule
fires, and a workflow runs. Keep all of that. Replace only the step where anyone can type the label
with a button that only the right people can press and that records who pressed it.
What you need
- Cuelight installed. GitHub doesn't need to be connected for
jira_updateactions. - The Jira project mapped under Cuelight settings → Projects
- Your existing Automation rule, unchanged
Actions
[
{
"id": "mark-ready",
"label": "Mark ready to deploy",
"style": "primary",
"type": "jira_update",
"jira": { "addLabels": ["ready-to-deploy"], "removeLabels": ["blocked"] },
"showWhen": {
"projects": ["SHOP"],
"statuses": ["In Review"],
"labelsNone": ["ready-to-deploy"]
},
"allow": { "groups": ["developers"] }
},
{
"id": "unmark-ready",
"label": "Take off the deploy list",
"type": "jira_update",
"jira": { "removeLabels": ["ready-to-deploy"] },
"showWhen": { "projects": ["SHOP"], "labelsAny": ["ready-to-deploy"] },
"allow": { "groups": ["developers"] }
}
]labelsNone and labelsAny make the two buttons swap places: once the label is on, only Take off
the deploy list shows.
Workflow
There's no new workflow. Your Automation rule stays as it is, for example:
- Trigger: Field value changed, field Labels
- Condition: Labels contains
ready-to-deploy - Action: Send web request, or whatever your rule does today
Cuelight changes the labels through Jira's API as the app, so the rule sees an ordinary label change. Press the button once on a test work item and check the rule's audit log to confirm it fired.
What people see
- A developer opens SHOP-142 and presses Mark ready to deploy. It runs at once; there's nothing to wait for.
- The work item gets one comment:
✓ Mark ready to deploy by Ayşe Kaya. Changes: labels="+ready-to-deploy -blocked" - Your Automation rule fires as before.
- Someone from QA sees the button disabled with "Only members of Developers can run this."
Variations
- Set a field instead. Use
"setFields": { "customfield_10050": "{{user.displayName}}" }to record who approved. Text, number and single-select fields work. - Move to a workflow later. When you're ready, change the action to
github_workflowand delete the Automation rule. The button, its permissions and its history stay the same.