nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: electron-userland/electron-forge
Pull request #329 (2017-09-21 15:30:45)

Allow config for Electron Release Server to be read from envars
* [x] I have read the [contribution documentation](https://github.com/electron-userland/electron-forge/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project follows, as appropriate.
* ~~[ ] The changes are appropriately documented (if applicable).~~
* [x] The changes have sufficient test coverage (if applicable).
* [x] The testsuite passes successfully on my local machine (if applicable).

Adds electronReleaseServer to the Forge Config template so configuration can be read from environment variables.

malept: The commit message should be Angular-style if you want it to show up in `CHANGELOG.md`.
Crevax: Oh right. Just rewrote it using the npm run commit command.

Patch:
diff --git a/src/util/forge-config.js b/src/util/forge-config.js
index a897ed4b5..785401f57 100644
--- a/src/util/forge-config.js
+++ b/src/util/forge-config.js
@@ -50,6 +50,7 @@ export default async (dir) => {
     electronInstallerRedhat: {},
     s3: {},
     github_repository: {},
+    electronReleaseServer: {},
   }, forgeConfig);
   forgeConfig.make_targets = Object.assign({
     win32: ['squirrel'],


Test patch:
diff --git a/test/fast/forge-config_spec.js b/test/fast/forge-config_spec.js
index f120b4d0b..d617e67de 100644
--- a/test/fast/forge-config_spec.js
+++ b/test/fast/forge-config_spec.js
@@ -23,6 +23,7 @@ const defaults = {
   },
   github_repository: {},
   s3: {},
+  electronReleaseServer: {},
 };
 
 describe('forge-config', () => {
@@ -54,7 +55,10 @@ describe('forge-config', () => {
     expect(conf.s3.secretAccessKey).to.equal(undefined);
 
     process.env.ELECTRON_FORGE_S3_SECRET_ACCESS_KEY = 'SecretyThing';
+    process.env.ELECTRON_FORGE_ELECTRON_RELEASE_SERVER_BASE_URL = 'http://example.com';
     expect(conf.s3.secretAccessKey).to.equal('SecretyThing');
+    expect(conf.electronReleaseServer.baseUrl).to.equal('http://example.com');
     delete process.env.ELECTRON_FORGE_S3_SECRET_ACCESS_KEY;
+    delete process.env.ELECTRON_FORGE_ELECTRON_RELEASE_SERVER_BASE_URL;
   });
 });
Repository: electron-userland/electron-forge
Pull request #335 (2017-09-26 04:39:53)

fix(generic): automatically warn w/a nightly package manager version
* [x] I have read the [contribution documentation](https://github.com/electron-userland/electron-forge/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project follows, as appropriate.
* [x] The changes are appropriately documented (if applicable).
* [x] The changes have sufficient test coverage (if applicable).
* [x] The testsuite passes successfully on my local machine (if applicable).

**Summarize your changes:**

ISSUES CLOSED: #334


Patch:
diff --git a/src/util/check-system.js b/src/util/check-system.js
index 66f6ade80..a9daf1898 100644
--- a/src/util/check-system.js
+++ b/src/util/check-system.js
@@ -27,10 +27,15 @@ const YARN_WHITELISTED_VERSIONS = {
   linux: '0.27.5',
 };
 
+export function isNightlyYarnVersion(version) {
+  return /((?:\d\.?)+)-\d.*/.test(version);
+}
+
 function warnIfPackageManagerIsntAKnownGoodVersion(packageManager, version, whitelistedVersions, ora) {
   const osVersions = whitelistedVersions[process.platform];
   const versions = osVersions ? `${whitelistedVersions.all} || ${osVersions}` : whitelistedVersions.all;
-  if (!semver.satisfies(version.toString(), versions)) {
+  const versionString = version.toString();
+  if (isNightlyYarnVersion(versionString) || !semver.satisfies(versionString, versions)) {
     ora.warn(
       `You are using ${packageManager}, but not a known good version.\n` +
       `The known versions that work with Electron Forge are: ${versions}`


Test patch:
diff --git a/test/fast/system_spec.js b/test/fast/system_spec.js
index 7db22a660..d2ff6eb19 100644
--- a/test/fast/system_spec.js
+++ b/test/fast/system_spec.js
@@ -1,10 +1,24 @@
 import { expect } from 'chai';
 
-import checkSystem from '../../src/util/check-system';
+import checkSystem, { isNightlyYarnVersion } from '../../src/util/check-system';
 import { fakeOra } from '../../src/util/ora';
 
 describe('check-system', () => {
   it('should succeed on valid agents', async () => {
     expect(await checkSystem(fakeOra())).to.be.equal(true);
   });
+
+  describe('isNightlyYarnVersion', () => {
+    it('should not match release versions', () => {
+      expect(isNightlyYarnVersion('0.10.0')).to.be.equal(false);
+    });
+
+    it('should not match rc/beta/alpha versions', () => {
+      expect(isNightlyYarnVersion('0.10.0-beta.1')).to.be.equal(false);
+    });
+
+    it('should match nightly versions', () => {
+      expect(isNightlyYarnVersion('0.23.0-20170311.0515')).to.be.equal(true);
+    });
+  });
 });
Repository: phase2/grunt-drupal-tasks
Pull request #204 (2015-11-11 20:05:00)

Properly use and allow 'magic override' of project.db setting.
@arithmetric @jhedstrom 

We were clobbering the profile setting with the previous implementation. Now we can supported nested config settings in the "magic conf" loader.


Patch:
diff --git a/lib/init.js b/lib/init.js
index f7c251f..e33389e 100644
--- a/lib/init.js
+++ b/lib/init.js
@@ -7,9 +7,10 @@ module.exports = function(grunt) {
   // This will take precedence over environment or project-shipped config.
   module.magic = function (name, envName) {
     envName = envName || name;
-    return grunt.config(['gdt', name])
+
+    return grunt.config(['gdt'].concat(name))
       || process.env['GDT_' + envName.toUpperCase()]
-      || grunt.config(['config', name]);
+      || grunt.config(['config'].concat(name));
   }
 
   // Ensure a default URL for the project.
@@ -46,7 +47,7 @@ module.exports = function(grunt) {
 
     grunt.config('config.domain', module.magic('domain') || require('os').hostname());
     grunt.config('config.alias', module.magic('alias', 'SITE_ALIAS') || '@' + grunt.config('config.domain'));
-    grunt.config('config.project.profile', module.magic('profile', 'INSTALL_PROFILE') || 'standard');
+    grunt.config('config.project.profile', module.magic(['project', 'profile'], 'INSTALL_PROFILE') || 'standard');
     grunt.config('config.siteUrls', module.magic('siteUrls') || {default: module.siteUrls});
     grunt.config('config.siteUrls.default', module.siteUrls());
     grunt.config('config.buildPaths', module.buildPaths());


Test patch:
diff --git a/test/library.js b/test/library.js
index 52d7a4a..76677ae 100644
--- a/test/library.js
+++ b/test/library.js
@@ -79,6 +79,15 @@ describe('Initialization', function() {
       assert.equal(init.magic('test_e', 'test_epsilon'), 'Enterprise');
       done();
     });
+    it('should allow a nested value to be overridden', function(done) {
+      grunt.config.init({
+        config: { nested: { item: 'a' } }
+      });
+
+      var init = require('../lib/init')(grunt);
+      assert.equal(init.magic(['nested', 'item'], 'nested_item'), 'a');
+      done();
+    });
   });
 
 });