Skip to content

Commit e8bfacb

Browse files
author
Jérémie Parker
committed
docs(contributors): assumption made on projects structure
1 parent 8d8bc65 commit e8bfacb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ inquirer
111111
when: async ({ action, project, projects }) => {
112112
if ([PROJECT_UPDATE, CONTRIBUTORS_ADD].includes(action)) {
113113
if (projects && !project) {
114-
project = projects[0]
114+
project = projects[0] // NOTE: assuming all projects have the same language set here
115115
}
116116
languages = await listProjectLanguages(project)
117117
return true

lib/addContributor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
const rp = require('request-promise')
22

3+
// NOTE: An assumption is made here that may require some changes to support a more general use case:
4+
// All projects have all the same languages OR poeditor API will ignore addition to non existing languages for a given project
5+
// this cases where not tested
36
module.exports = ({ API_TOKEN }) => (email, name, projects, languages) =>
47
Promise.all(
58
projects.map(async (id) =>

0 commit comments

Comments
 (0)