chemaclass / jirastatusnotifier Goto Github PK
View Code? Open in Web Editor NEWNotify via Slack|Email when the JIRA-tickets doesn't move along
Home Page: https://packagist.org/packages/chemaclass/jira-status-notifier
License: Other
Notify via Slack|Email when the JIRA-tickets doesn't move along
Home Page: https://packagist.org/packages/chemaclass/jira-status-notifier
License: Other
Create some logic which by placing a list of users (Jira user ids) these users will be ignored in order to send them any notification. This is a useful feature to avoid unnecessary spam to people who's out of the office/workingTime for any reason (working student free day, sick leave for X days, etc).
Proposals:
IGNORE_JIRA_USERS:{"jira.user.id":false}
or maybe just a list for now like:
IGNORE_JIRA_USERS:["jira.user.id"]
Currently, while running the examples/using-cli-channel
, when nobody is assigned to a JiraTicket then it will render nothing.
We should render "None", instead of nothing.
Instead of having the Makefile
alias, use the composer scripts.
Even for development, in our case, Makefile
doesn't really bring any extra value having already. composer scripts.
composer.scripts
in composer.json
README.md
fileCurrently, we generate the email template directly in src/ScrumMaster/Channel/Email/MessageGenerator.php
.
We already installed twig, and use it in the output example.
MessageGenerator
(or similar).We send one ticket information as a notification (via slack) per ticket
Similar as we did in the issue #28, let's do the same idea-feature for Slack\Channel
: send only one message per user. The message should contain information from all the tickets.
A project has one board. A board has multiple statuses. In the status-board, we can find multiple tickets.
The command outputs the total of notifications that were sent out. For example:
Total notifications: 3 (KEY-1, KEY-2: user.1, KEY-3: user.2)
Total successful notifications sent: 2
Total failed notifications sent: 1
The command should output the successful AND failed "ticket-keys" as well. For example:
Total notifications: 3 (KEY-1, KEY-2: user.1, KEY-3: user.2)
Total successful notifications sent: 2 (KEY-1, KEY-2)
Total failed notifications sent: 1 (KEY-3)
200
200
Currently, the notifications go always to Slack.
We should allow notifications to the email from the JIRA user.
Create a Channel which will send an email to the assigned person email with a specific template (not necessary the same template as the slack message).
The command outputs the total of notifications that were sent out with the Jira ticket keys next to it. For example:
Total notifications: 3 (KEY-1, KEY-2, KEY-3)
The command should output the assigned user (user.key from Jira) next to each Jira-Ticket key. For example:
Total notifications: 3 (KEY-1: jira.user.1, KEY-2: jira.user.1, KEY-3: jira.user.2)
We already have php-cs-fixer
in place. In fact, we can just run bin/csfix
to run and apply the fixer in the hole project.
We should find a way to make red/fail the PR/pipeline, so it can't be merged until the styles are fixed.
Currently, bin/composer, bin/csfix and bin/tests are running only from local: they exec docker and run the proper command inside.
What we need is that inside each of these files we will check if we are already inside the docker image, and in affirmative case avoid the docker exec...
part and just run the command.
Currently, the Tickets::FIELD_STORY_POINTS
key has a constant string value which might be different from other companies or projects. This is the key that we use in order to get the story point value from the API response.
namespace Chemaclass\ScrumMaster\Jira;
final class Tickets
{
public const FIELD_STORY_POINTS = 'customfield_10005';
// ... more code
private static function newJiraTicket(array $item): JiraTicket
{
$fields = $item['fields'];
return new JiraTicket(
$fields['summary'],
$item['key'],
static::newTicketStatus($fields),
static::newAssignee($fields['assignee'] ?? []),
$storyPoints = (int) $fields[self::FIELD_STORY_POINTS] // <--- Here!
);
}
// ... more code
We should be able to define this key somehow in order to get rid of this constant. A possible solution might be injecting its value via the constructor.
Tickets::FIELD_STORY_POINTS
as a contant. Instead make this value customizable from the outside. The client (see the using examples console
files) needs to be able to define this key to whatever value they want.In order to split concerns, let's try out a render engine like Twig to render the views in another place, not mixed with the PHP logic.
Write a "Channel" to only retrieve the information without sending any notification
We generate the slack message using pure PHP code.
Like we did for email here #46 (use twig for rendering the email body), I would like to use the same idea for the slack notifications as well.
I would like to know how long remain every Jira ticket, from the current sprint, since their last status change.
There are plenty of "helper files" inside the bin directory. We could define certain tasks in a Makefile, so we could trigger them by just calling "make {task}" instead.
bin
directoryA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.