Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix data event parsing & add host #754

Merged

Conversation

bertrandda
Copy link
Contributor

@bertrandda bertrandda commented Apr 24, 2020

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
  • If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.
  • Did you add fake requests data for the demo mode (front/src/config/demo.json) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

This PR:

  • improve requests to retrieve events, by adding Content-Type header with application/xml as value (mandatory for some hosts).
  • fix how data extraction is done for events because hosts do not use always the same tags to format data (, cal:calendar-data...) now we use regex
  • add hosts to help during configuration (Google Calendar & Synology)

Capture d’écran 2020-04-24 à 22 58 48

@codecov
Copy link

codecov bot commented Apr 24, 2020

Codecov Report

Merging #754 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #754      +/-   ##
==========================================
+ Coverage   92.71%   92.78%   +0.06%     
==========================================
  Files         419      419              
  Lines        5421     5416       -5     
==========================================
- Hits         5026     5025       -1     
+ Misses        395      391       -4     
Impacted Files Coverage Δ
.../services/caldav/lib/calendar/calendar.requests.js 100.00% <100.00%> (+10.52%) ⬆️
.../caldav/lib/calendar/calendar.syncUserCalendars.js 98.14% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 242bd84...9d675ac. Read the comment docs.

@Pierre-Gilles
Copy link
Contributor

Pierre-Gilles commented May 4, 2020

Hey!

Thanks for the fixes 🙂

It seems that your code coverage is a little bit low, do you see how to fix it?

@bertrandda bertrandda force-pushed the fix/caldav-event-parsing branch from 44f3d06 to 8f00e1e Compare May 28, 2020 21:03
@bertrandda
Copy link
Contributor Author

Hey!

Thanks for the fixes 🙂

It seems that your code coverage is a little bit low, do you see how to fix it?

I'm back, and try to fix that.

@bertrandda bertrandda requested a review from Pierre-Gilles June 4, 2020 18:31
@Pierre-Gilles Pierre-Gilles merged commit e4a0792 into GladysAssistant:master Jul 28, 2020
NickDub-old pushed a commit to NickDub/Gladys that referenced this pull request Aug 7, 2020
GladysAssistant#754)

* Fix data event parsing & add host

* Improve code coverage

* Improve code coverage

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
R6n0 pushed a commit to R6n0/Gladys that referenced this pull request Dec 2, 2020
GladysAssistant#754)

* Fix data event parsing & add host

* Improve code coverage

* Improve code coverage

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants