• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

screwdriver-cd / screwdriver / #3412

12 May 2026 12:11AM UTC coverage: 75.519% (-19.9%) from 95.405%
#3412

Pull #3493

screwdriver

web-flow
Merge branch 'master' into fix_event_meta_update
Pull Request #3493: fix: Exclusive control over meta updates

1703 of 2430 branches covered (70.08%)

Branch coverage included in aggregate %.

13 of 13 new or added lines in 1 file covered. (100.0%)

1057 existing lines in 57 files now uncovered.

4374 of 5617 relevant lines covered (77.87%)

106.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/plugins/pipelines/batchUpdateAdmins.js
1
'use strict';
2

3
const schema = require('screwdriver-data-schema');
1✔
4
const joi = require('joi');
1✔
5
const idSchema = schema.models.pipeline.base.extract('id');
1✔
6
const scmContextSchema = schema.models.pipeline.base.extract('scmContext');
1✔
7
const usernameSchema = schema.models.user.base.extract('username');
1✔
8
const { batchUpdatePipelineAdmins } = require('./helper/updateAdmins');
1✔
9

10
module.exports = () => ({
393✔
11
    method: 'PUT',
12
    path: '/pipelines/updateAdmins',
13
    options: {
14
        description: 'Update admins for a collection of pipelines',
15
        notes: 'Update the admins for a collection of pipelines',
16
        tags: ['api', 'pipelines'],
17
        auth: {
18
            strategies: ['token'],
19
            scope: ['user', '!guest', 'admin']
20
        },
21
        handler: async (request, h) => {
UNCOV
22
            const { scmContext, username, scope } = request.auth.credentials;
×
UNCOV
23
            const { payload } = request;
×
UNCOV
24
            const { userFactory } = request.server.app;
×
UNCOV
25
            const isSDAdmin = scope.includes('admin');
×
UNCOV
26
            const user = await userFactory.get({ username, scmContext });
×
27

UNCOV
28
            await batchUpdatePipelineAdmins(payload, user, isSDAdmin, request.server);
×
29

UNCOV
30
            return h.response().code(204);
×
31
        },
32
        validate: {
33
            payload: joi
34
                .array()
35
                .items(
36
                    joi.object({
37
                        id: idSchema.required(),
38
                        scmContext: scmContextSchema.required(),
39
                        usernames: joi.array().items(usernameSchema).min(1).max(200).required()
40
                    })
41
                )
42
                .min(1)
43
        }
44
    }
45
});
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc