You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -66,27 +65,11 @@ async function main (params) {
66
65
returnutils.action_error(e,'Error retrieving GitHub API instance on behalf of app installation.');
67
66
}
68
67
69
-
// Check if author is employee; this has separate logic for Adobe vs. Magento
70
-
// employees.
68
+
// Check if author is employee.
71
69
letis_employee;
72
70
if(org==='magento'){
73
-
// For the magento org, we need to see if the user is a member of the
74
-
// magento-employees team to determine whether they are an employee
75
-
// m.then(gh => gh.teams.getMembership({ team_id: teamId, username: user }).then(result => console.log(`${user} is a ${result.data.state} ${result.data.role} of the magento-employees team`)).catch(err => { console.error(`${user} got membership in magento-employees team result of "${err.message}"!`); }));
76
-
try{
77
-
is_employee=awaitgithub.teams.getMembership({
78
-
team_id: MAGENTO_EMPLOYEES_TEAM,
79
-
username: user
80
-
});
81
-
}catch(e){
82
-
if(e.message.includes('Not Found')){
83
-
constres=awaitcheck_cla(ow,args);
84
-
returnres;
85
-
}else{
86
-
returnutils.action_error(e,'Error during checking of Magento employees membership in the Magento org.');
it('should invoke the setgithubcheck action with a status of completed if user is not a member of the magento org but has signed a cla',asyncfunction(){
it(`should invoke the setgithubcheck action with a conclusion of action_required if user is not a member of the magento org and no agreements are found containing the user's github username`,asyncfunction(){
166
+
it(`should invoke the setgithubcheck action with a conclusion of action_required if user no agreements are found containing the user's github username`,asyncfunction(){
199
167
constparams={
200
168
pull_request: {
201
169
user: {login: 'hiren'},
@@ -210,9 +178,6 @@ describe('checker action', function () {
@@ -245,7 +210,7 @@ describe('checker action', function () {
245
210
expect(action_invoke_args.params.title).toContain('Sign the Adobe CLA');
246
211
expect(response.statusCode).toBe(200);
247
212
});
248
-
it('should invoke the setgithubcheck action with a conclusion of action_required if user is not a member of the magento org and zero signed CLAs exist',asyncfunction(){
213
+
it('should invoke the setgithubcheck action with a conclusion of action_required if zero signed CLAs exist',asyncfunction(){
249
214
constparams={
250
215
pull_request: {
251
216
user: {login: 'hiren'},
@@ -260,9 +225,6 @@ describe('checker action', function () {
0 commit comments