Skip to content

Commit a900528

Browse files
author
Jérémie Parker
committed
feat(contributor): add some logging to report on api call status
1 parent dc4ec6f commit a900528

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/addContributor.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ module.exports = ({ API_TOKEN }) => (email, name, projects, languages) =>
2323
language,
2424
},
2525
})
26+
.then(() => console.log(`added to ${language} in project ${id}`))
27+
.catch((err) => {
28+
console.log(`failed to add to ${language} in project ${id}`)
29+
console.error(err)
30+
})
2631
)
2732
)
2833
)

lib/removeContributor.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ module.exports = ({ API_TOKEN }) => (email, projects, languages) =>
2121
language,
2222
},
2323
})
24+
.then(() => console.log(`removed from ${language} in project ${id}`))
25+
.catch((err) => {
26+
console.log(`failed to remove from ${language} in project ${id}`)
27+
console.error(err)
28+
})
2429
)
2530
)
2631
)

0 commit comments

Comments
 (0)