nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: reactiflux/discord-irc
Pull request #520 (2019-12-14 17:27:54)

Rename ircPreventMention to parallelPingFix
Per #517, the config name isn't very clear. Since we haven't yet cut a release with it, we rename it here.

Probably not the best name but I don't want to waste too much time thinking of a perfect one.

coveralls: 
[![Coverage Status](https://coveralls.io/builds/27615763/badge)](https://coveralls.io/builds/27615763)

Coverage remained the same at 97.207% when pulling **69b42395af4e65a19d722f917d8102ed093bf408 on Throne3d:rename/ircpreventmention-parallelpingfix** into **4e807ca34de1c4f876449a1717eb14ba93d3df57 on reactiflux:master**.


Patch:
diff --git a/README.md b/README.md
index 1afa8e4..2289699 100644
--- a/README.md
+++ b/README.md
@@ -88,7 +88,7 @@ First you need to create a Discord bot user, which you can do by following the i
       "webhookAvatarURL": "https://robohash.org/{$nickname}" // Default avatar to use for webhook messages
     },
     "ircNickColor": false, // Gives usernames a color in IRC for better readability (on by default)
-    "ircPreventMention": true, // Prevents users of both IRC and Discord from being mentioned in IRC when they speak in Discord (off by default)
+    "parallelPingFix": true, // Prevents users of both IRC and Discord from being mentioned in IRC when they speak in Discord (off by default)
     // Makes the bot hide the username prefix for messages that start
     // with one of these characters (commands):
     "commandCharacters": ["!", "."],
diff --git a/lib/bot.js b/lib/bot.js
index 35fc934..fa22536 100644
--- a/lib/bot.js
+++ b/lib/bot.js
@@ -37,7 +37,7 @@ class Bot {
     this.discordToken = options.discordToken;
     this.commandCharacters = options.commandCharacters || [];
     this.ircNickColor = options.ircNickColor !== false; // default to true
-    this.ircPreventMention = options.ircPreventMention === true; // default: false
+    this.parallelPingFix = options.parallelPingFix === true; // default: false
     this.channels = _.values(options.channelMapping);
     this.ircStatusNotices = options.ircStatusNotices;
     this.announceSelfJoin = options.announceSelfJoin;
@@ -327,7 +327,7 @@ class Bot {
       let text = this.parseText(message);
       let displayUsername = nickname;
 
-      if (this.ircPreventMention) {
+      if (this.parallelPingFix) {
         // Prevent users of both IRC and Discord from
         // being mentioned in IRC when they talk in Discord.
         displayUsername = `${displayUsername.slice(0, 1)}\u200B${displayUsername.slice(1)}`;


Test patch:
diff --git a/test/bot.test.js b/test/bot.test.js
index 268255a..f6f68b2 100644
--- a/test/bot.test.js
+++ b/test/bot.test.js
@@ -336,8 +336,8 @@ describe('Bot', function () {
     }
   );
 
-  it('should break mentions when ircPreventMention is enabled', function () {
-    const newConfig = { ...config, ircPreventMention: true };
+  it('should break mentions when parallelPingFix is enabled', function () {
+    const newConfig = { ...config, parallelPingFix: true };
     this.bot = new Bot(newConfig);
     this.bot.connect();
Repository: aliyun/fun
Pull request #223 (2019-05-20 03:45:20)

fix need ram permission bug event though service role has been configured


Patch:
diff --git a/lib/deploy/deploy-by-tpl.js b/lib/deploy/deploy-by-tpl.js
index 5e3e974..f38c69f 100644
--- a/lib/deploy/deploy-by-tpl.js
+++ b/lib/deploy/deploy-by-tpl.js
@@ -195,7 +195,11 @@ async function deployService(baseDir, serviceName, serviceRes) {
     createRoleIfNotExist = false;
   }
 
-  if (roleArn || (policies || !_.isEmpty(vpcConfig) || !_.isEmpty(logConfig))) {
+  // if roleArn has been configured, dont need `makeRole`, because `makeRole` need ram permissions. 
+  // However, in some cases, users do not want to configure ram permissions for ram users.
+  // https://github.com/aliyun/fun/issues/182
+  // https://github.com/aliyun/fun/pull/223
+  if (!roleArn && (policies || !_.isEmpty(vpcConfig) || !_.isEmpty(logConfig))) {
     // create role
     role = await makeRole(roleName, createRoleIfNotExist);
   }
@@ -227,7 +231,7 @@ async function deployService(baseDir, serviceName, serviceRes) {
   }
   await makeService({
     serviceName,
-    role: ((role || {}).Role || {}).Arn || '',
+    role: ((role || {}).Role || {}).Arn || roleArn || '',
     internetAccess,
     description: (serviceRes.Properties || {}).Description,
     logConfig,


Test patch:
diff --git a/test/deploy/deploy-by-tpl.test.js b/test/deploy/deploy-by-tpl.test.js
index 4d6fba2..f200140 100644
--- a/test/deploy/deploy-by-tpl.test.js
+++ b/test/deploy/deploy-by-tpl.test.js
@@ -63,7 +63,7 @@ describe('deploy service role ', () => {
     assert.notCalled(ram.attachPolicyToRole);    
   });
   
-  it('police and  vpc', async() =>{
+  it('police and vpc', async() =>{
     await deploy('nas');
     assert.calledWith(ram.makeRole, '', true);
     assert.notCalled(ram.makePolicy);
@@ -78,7 +78,7 @@ describe('deploy service role ', () => {
 
   it('only role', async() =>{
     await deploy('service_role');
-    assert.calledWith(ram.makeRole, 'aliyunfcgeneratedrole-fc', false);
+    assert.notCalled(ram.makeRole);
     assert.notCalled(ram.makeAndAttachPolicy);
     assert.notCalled(ram.attachPolicyToRole);
     assert.notCalled(ram.makePolicy);
@@ -1028,4 +1028,3 @@ describe('custom domain', () => {
     });
   });
 });
-
Repository: aliyun/fun
Pull request #75 (2018-08-14 08:11:57)

示例中的openIdApiType中的id的i需要大写
按照之前的代码设置了`openidApiType`为`IDTOKEN`，但是用`fun deploy`时一直报错
```shell
The IdTokenParamName is mandatory for this action.
```
看了[文档](https://www.alibabacloud.com/help/zh/doc-detail/61459.htm#h2-openidconnectconfig-13)之后终于发现文档中写的是`OpenIdApiType`，试了之后部署成功。


CLAassistant: [![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/aliyun/fun?pullRequest=75) <br/>Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/aliyun/fun?pullRequest=75) before we can accept your contribution.<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/aliyun/fun?pullRequest=75) it.</sub>
tanhe123: 感谢🙏

Patch:
diff --git a/examples/openid_connect/template.yml b/examples/openid_connect/template.yml
index e229ddf..75abafd 100644
--- a/examples/openid_connect/template.yml
+++ b/examples/openid_connect/template.yml
@@ -30,7 +30,7 @@ Resources:
             x-aliyun-apigateway-auth-type: 'APPOPENID'
             x-aliyun-apigateway-open-id-connect-config:
               idTokenParamName: 'token'
-              openidApiType: 'BUSINESS'
+              openIdApiType: 'BUSINESS'
             x-aliyun-apigateway-fc:
               arn: acs:fc:::services/${fc.Arn}/functions/${helloworld.Arn}/
-            
\ No newline at end of file
+            


Test patch:
diff --git a/test/deploy/deploy-by-tpl.test.js b/test/deploy/deploy-by-tpl.test.js
index c952082..e389f8a 100644
--- a/test/deploy/deploy-by-tpl.test.js
+++ b/test/deploy/deploy-by-tpl.test.js
@@ -148,7 +148,7 @@ describe('deploy', () => {
       auth: {
         config: {
           'idTokenParamName': 'token',
-          'openidApiType': 'BUSINESS'
+          'openIdApiType': 'BUSINESS'
         },
         type: 'APPOPENID'
       },
@@ -456,4 +456,4 @@ describe('deploy', () => {
       resultConfig: { failResultSample: undefined, resultSample: undefined, resultType: undefined },      serviceTimeout: 3000
     });
   });
-});
\ No newline at end of file
+});