Skip to content

Commit

Permalink
1.3.0 (#6)
Browse files Browse the repository at this point in the history
* Remove: Absence duration
* Remove: Absence prefix
* Update: Eslint version
  • Loading branch information
sergejmueller committed Apr 25, 2019
1 parent 22b5bf3 commit 5db2cf2
Show file tree
Hide file tree
Showing 5 changed files with 369 additions and 378 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# oppy / CHANGELOG


### 1.3.0 (2019-04-25)

* Remove: Absence duration
* Remove: Absence prefix
* Update: Eslint version


### 1.2.2 (2019-03-04)

* Update: Slack API message design
Expand Down
12 changes: 3 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@

// Required packages
const got = require('got');
const util = require('util');
const ical = require('node-ical');
const DateDiff = require('date-diff');
const pluralize = require('pluralize');
const CachemanFile = require('cacheman-file');
const difference = require('lodash.difference');
const argv = require('mri')(process.argv.slice(2));
Expand Down Expand Up @@ -56,13 +54,9 @@ ical.fromURL(argv['personio-ics'], {}, (error, data) => {
return;
}

absences.push(
util.format(
'>%s _(%s)_',
event.summary,
pluralize('day', diffDays, true)
)
);
const absentPerson = event.summary.replace(/^\[.+\]\s/, '');

absences.push(`>${absentPerson}`);
});

// Exit if empty
Expand Down
Loading

0 comments on commit 5db2cf2

Please sign in to comment.