Skip to content

Commit 04f829f

Browse files
committed
Log returned as html; #20
1 parent c295daf commit 04f829f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# Changelog
22

3-
## [Latest](https://github.com/cortex-lab/matlab-ci/commits/master)
3+
## [Latest](https://github.com/cortex-lab/matlab-ci/commits/master) [2.2.0]
44

5+
### Modified
6+
7+
- test log formatted in html
8+
- coverage checks ignored for branches named 'documentation'
9+
10+
## [2.1.0]
511
### Added
612

713
- coverage increase check on pull request events
@@ -13,6 +19,7 @@
1319
- suppress warnings about shadowing builtins in runAllTests
1420
- run tests in subfolders
1521
- filter out performance tests
22+
- skip tests for commits to branches named 'documentation'
1623

1724
## [2.0.0]
1825
### Added

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ srv.get('/github/:id', function (req, res) {
155155
res.send(`Record for commit ${req.params.id} not found`);
156156
} else {
157157
res.statusCode = 200;
158-
res.send(data);
158+
preText = '<html><body><pre>';
159+
postText = '</pre></body></html>';
160+
res.send(preText + data + postText);
161+
159162
}
160163
});
161164
/*
@@ -407,6 +410,8 @@ handler.on('push', async function (event) {
407410
// Handle pull request events
408411
// Here we'll update coverage
409412
handler.on('pull_request', async function (event) {
413+
// Ignore documentation branches
414+
if (event.payload.pull_request.head.ref === 'documentation') { return; }
410415
// Log the event
411416
console.log('Received a pull_request event for %s to %s',
412417
event.payload.pull_request.head.repo.name,

0 commit comments

Comments
 (0)