Coder Social home page Coder Social logo

Comments (6)

driesvints avatar driesvints commented on April 28, 2024 1

FYI: see some follow up here: #181

from envoy.

colorgreen avatar colorgreen commented on April 28, 2024

$task variable is not defined in @finished scope, thats why you don't see task name.
Slack.php:74

$message = $this->message ?: ($this->task ? ucwords($this->getSystemUser()).' ran the ['.$this->task.'] task.' : ucwords($this->getSystemUser()).' ran a task.');

You can use @after section. Look this #167

from envoy.

GertjanRoke avatar GertjanRoke commented on April 28, 2024

@colorgreen But isn't it handy to also know which @story or @task you ran inside the @finished?
Because now I need to make all kinds of if statements to check which one was run to show the correct notification.

If the $task variable will also be available inside the @finsihed you don't need to think about it.

from envoy.

driesvints avatar driesvints commented on April 28, 2024

Hey @GertjanRoke. If you want task specific context for your slack messages you need to define the @slack annotation within the task itself at the end. There is no "task" context in the @finished part because that's only meant to run separately at the end outside any story or task context.

The reason for this mostly is that if you have a lot of running tasks, your slack channel would be spammed every time you ran your envoy script. By adding the slack annotation specifically to the tasks you want to get info about you can selectively know which ones were run.

from envoy.

driesvints avatar driesvints commented on April 28, 2024

I've sent in a PR to the docs clarify this: laravel/docs#5568

from envoy.

arwinvdv avatar arwinvdv commented on April 28, 2024

$__task now available see https://github.com/laravel/envoy/releases/tag/v2.8.4

from envoy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.