From fa0efe05866a497e75e6cf0ab5daffa035f0f2d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Dec 2020 22:53:12 +0000 Subject: [PATCH 01/29] Bump dompurify from 2.0.7 to 2.0.17 Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.0.7 to 2.0.17. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](https://github.com/cure53/DOMPurify/compare/2.0.7...2.0.17) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index bced7e53f5..a6fa650c9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5062,9 +5062,9 @@ } }, "dompurify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.7.tgz", - "integrity": "sha512-S3O0lk6rFJtO01ZTzMollCOGg+WAtCwS3U5E2WSDY/x/sy7q70RjEC4Dmrih5/UqzLLB9XoKJ8KqwBxaNvBu4A==" + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.17.tgz", + "integrity": "sha512-nNwwJfW55r8akD8MSFz6k75bzyT2y6JEa1O3JrZFBf+Y5R9JXXU4OsRl0B9hKoPgHTw2b7ER5yJ5Md97MMUJPg==" }, "domutils": { "version": "1.5.1", diff --git a/package.json b/package.json index 9915593a74..6da28b6389 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "bytes": "3.1.0", "classnames": "2.2.6", "compare-sets": "1.0.1", - "dompurify": "2.0.7", + "dompurify": "2.0.17", "dugite": "1.92.0", "event-kit": "2.5.3", "fs-extra": "4.0.3", From 96e6e4a306a32b368d9a500be86fc56fb22ffb86 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Fri, 1 Jan 2021 19:42:50 -0600 Subject: [PATCH 02/29] use action-setup-atom --- .github/workflows/ci.yml | 165 ++++++++++----------------------------- 1 file changed, 42 insertions(+), 123 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b063d7c50f..35ecf116d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,97 +1,46 @@ name: ci on: + pull_request: push: branches: - master - pull_request: - types: - - opened - - reopened - - synchronize jobs: - linux-tests: - name: linux tests - runs-on: ubuntu-18.04 + tests: + name: tests + strategy: + matrix: + os: [ubuntu-18.04, macos-10.14, windows-latest] + channel: [beta, nightly] + fail-fast: false + runs-on: ${{ matrix.os }} env: - DISPLAY: ":99" ATOM_GITHUB_BABEL_ENV: coverage - ATOM_CHANNEL: nightly - ATOM: /tmp/atom/usr/bin/atom-nightly - APM: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm MOCHA_TIMEOUT: 60000 UNTIL_TIMEOUT: 30000 steps: - uses: actions/checkout@v1 - name: install Atom - shell: bash - run: | - curl -s -L https://atom.io/download/deb?channel=${ATOM_CHANNEL} \ - -H 'Accept: application/octet-stream' \ - -o /tmp/atom-amd64.deb - /sbin/start-stop-daemon --start --quiet \ - --pidfile /tmp/custom_xvfb_99.pid \ - --make-pidfile --background \ - --exec /usr/bin/Xvfb \ - -- :99 -ac -screen 0 1280x1024x16 - sudo apt-get update - sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin - dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom - - name: install dependencies - shell: bash - run: ${APM} ci - - name: configure git - shell: bash - run: | - git config --global user.name Hubot - git config --global user.email hubot@github.com - - name: run tests - shell: bash - run: ${ATOM} --test test/ - - name: report code coverage - shell: bash - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }} - SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }} - BUILD_SOURCEBRANCH: ${{ github.event.ref }} - run: | - npm run report:coverage - bash <(curl -s https://codecov.io/bash) \ - -n "Linux" \ - -P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \ - -B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}" - if: success() || failure() + uses: UziTech/action-setup-atom@v1 + with: + channel: ${{ matrix.channel }} - macos-tests: - name: macos tests - runs-on: macos-10.14 - env: - ATOM_GITHUB_BABEL_ENV: coverage - ATOM_CHANNEL: nightly - ATOM: /tmp/atom/Atom\ Nightly.app/Contents/Resources/app/atom.sh - APM: /tmp/atom/Atom\ Nightly.app/Contents/Resources/app/apm/bin/apm - MOCHA_TIMEOUT: 60000 - UNTIL_TIMEOUT: 30000 - steps: - - uses: actions/checkout@v1 - - name: install Atom - shell: bash + - name: install windows build tools + if: contains(matrix.os, 'windows') run: | - curl -s -L https://atom.io/download/mac?channel=${ATOM_CHANNEL} \ - -H 'Accept: application/octet-stream' \ - -o /tmp/atom.zip - sudo unzip -q /tmp/atom.zip -d /tmp/atom + choco install visualcpp-build-tools --version=14.0.25420.1 --ignore-dependencies -y --params "'/IncludeRequired'" + echo ::set-env name=VCTargetsPath::'C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140' - name: install dependencies - shell: bash - run: sh -c "${APM} ci" - - name: configure git - shell: bash - run: | - git config --global user.name Hubot - git config --global user.email hubot@github.com - - name: run tests - shell: bash - run: sh -c "${ATOM} --test test/" + run: apm ci + + - name: Run the tests + if: ${{ !contains(matrix.os, 'windows') }} + run: atom --test test + + - name: Run the tests on Windows + if: ${{ contains(matrix.os, 'windows') }} + continue-on-error: true # due to https://github.com/atom/github/pull/2459#issuecomment-624725972 + run: atom --test test + - name: report code coverage shell: bash env: @@ -99,74 +48,44 @@ jobs: SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }} SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }} BUILD_SOURCEBRANCH: ${{ github.event.ref }} + OS_NAME: ${{ matrix.os }} run: | npm run report:coverage + COVERAGE_NAME=$([[ "${OS_NAME}" == macos* ]] && echo "macOS" || echo "Linux") bash <(curl -s https://codecov.io/bash) \ - -n "macOS" \ + -n "${COVERAGE_NAME}" \ -P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \ -B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}" - if: success() || failure() - + if: | + !contains(matrix.os, 'windows') && + (success() || failure()) lint: name: lint runs-on: ubuntu-18.04 - env: - DISPLAY: ":99" - ATOM_CHANNEL: nightly - ATOM: /tmp/atom/usr/bin/atom-nightly - APM: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm steps: - uses: actions/checkout@v1 - name: install Atom - shell: bash - run: | - curl -s -L https://atom.io/download/deb?channel=${ATOM_CHANNEL} \ - -H 'Accept: application/octet-stream' \ - -o /tmp/atom-amd64.deb - /sbin/start-stop-daemon --start --quiet \ - --pidfile /tmp/custom_xvfb_99.pid \ - --make-pidfile --background \ - --exec /usr/bin/Xvfb \ - -- :99 -ac -screen 0 1280x1024x16 - sudo apt-get update - sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin - dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom + uses: UziTech/action-setup-atom@v1 + with: + channel: nightly - name: install dependencies - shell: bash - run: ${APM} ci + run: apm ci - name: lint - shell: bash run: npm run lint snapshot-tests: name: snapshot tests runs-on: ubuntu-18.04 env: - DISPLAY: ":99" - ATOM_CHANNEL: nightly - ATOM: /tmp/atom/usr/bin/atom-nightly - APM: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm ATOM_GITHUB_BABEL_ENV: coverage ATOM_GITHUB_TEST_SUITE: snapshot steps: - uses: actions/checkout@v1 - name: install Atom - shell: bash - run: | - curl -s -L https://atom.io/download/deb?channel=${ATOM_CHANNEL} \ - -H 'Accept: application/octet-stream' \ - -o /tmp/atom-amd64.deb - /sbin/start-stop-daemon --start --quiet \ - --pidfile /tmp/custom_xvfb_99.pid \ - --make-pidfile --background \ - --exec /usr/bin/Xvfb \ - -- :99 -ac -screen 0 1280x1024x16 - sudo apt-get update - sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin - dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom + uses: UziTech/action-setup-atom@v1 + with: + channel: nightly - name: install dependencies - shell: bash - run: ${APM} ci + run: apm ci - name: run snapshot tests - shell: bash - run: ${ATOM} --test test/ + run: atom --test test/ From 9b5ae9a5d86fc7d16161f670cd6668e65e77c3db Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 24 Jan 2021 09:22:46 -0500 Subject: [PATCH 03/29] test: Disable failing file-patch tests for Atom CI --- test/integration/file-patch.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/integration/file-patch.test.js b/test/integration/file-patch.test.js index d2d3a0d9e1..f608b1ef51 100644 --- a/test/integration/file-patch.test.js +++ b/test/integration/file-patch.test.js @@ -7,6 +7,10 @@ import {setup, teardown} from './helpers'; import GitShellOutStrategy from '../../lib/git-shell-out-strategy'; describe('integration: file patches', function() { + // NOTE: This test does not pass on VSTS macOS builds. It will be re-enabled + // once the underlying problem is solved. See atom/github#2617 for details. + if (process.env.CI_PROVIDER === 'VSTS') { return; } + let context, wrapper, atomEnv; let workspace; let commands, workspaceElement; From 47a954491b871c56bace1adc7dd95864cceb6ee4 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Thu, 28 Jan 2021 09:37:34 -0600 Subject: [PATCH 04/29] Update .github/workflows/ci.yml Co-authored-by: Amin Yahyaabadi --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35ecf116d7..9800b98fce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: if: contains(matrix.os, 'windows') run: | choco install visualcpp-build-tools --version=14.0.25420.1 --ignore-dependencies -y --params "'/IncludeRequired'" - echo ::set-env name=VCTargetsPath::'C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140' + echo "VCTargetsPath='C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140'" >> $GITHUB_ENV - name: install dependencies run: apm ci From 6951c7bbf23f8b75e064d40064927a4e07d995db Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Thu, 28 Jan 2021 16:01:44 -0500 Subject: [PATCH 05/29] Prepare v0.36.7 release --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index a6fa650c9d..d7bd334e87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "github", - "version": "0.36.6", + "version": "0.36.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6da28b6389..8d2f299c41 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "github", "main": "./lib/index", - "version": "0.36.6", + "version": "0.36.7", "description": "GitHub integration", "repository": "https://github.com/atom/github", "license": "MIT", From b7eb37e73d908f024ef52a4bfc15392533772b4c Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Thu, 28 Jan 2021 18:28:55 -0600 Subject: [PATCH 06/29] configure git --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9800b98fce..b43c118f2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,12 @@ jobs: - name: install dependencies run: apm ci + - name: configure git + shell: bash + run: | + git config --global user.name Hubot + git config --global user.email hubot@github.com + - name: Run the tests if: ${{ !contains(matrix.os, 'windows') }} run: atom --test test From fb51a20844c63950e1f2bfb70944c9c7bc7c6a1f Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Fri, 29 Jan 2021 14:42:17 -0500 Subject: [PATCH 07/29] package.json: pin @babel/core to less than 7.12.10 Workaround for https://github.com/atom/github/issues/2620 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 8d2f299c41..f5b414f5e2 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "dependencies": { "@atom/babel-plugin-chai-assert-async": "1.0.0", "@atom/babel7-transpiler": "1.0.0-1", + "@babel/core": "7.x <7.12.10", "@babel/generator": "7.8.0", "@babel/plugin-proposal-class-properties": "7.8.0", "@babel/plugin-proposal-object-rest-spread": "7.8.0", From 017f59a231a67f68b3fb097f39b6377d7c07dcb7 Mon Sep 17 00:00:00 2001 From: sadick254 Date: Thu, 11 Feb 2021 08:45:41 +0300 Subject: [PATCH 08/29] Update shell.openExternal to promise due to electron update on atom --- lib/controllers/issueish-list-controller.js | 12 ++------ .../issueish-searches-controller.js | 9 ++---- lib/controllers/remote-controller.js | 12 ++------ lib/views/actionable-review-view.js | 29 ++++++------------- lib/views/issueish-link.js | 14 ++------- 5 files changed, 19 insertions(+), 57 deletions(-) diff --git a/lib/controllers/issueish-list-controller.js b/lib/controllers/issueish-list-controller.js index 94635a6cc6..93ebfa9b61 100644 --- a/lib/controllers/issueish-list-controller.js +++ b/lib/controllers/issueish-list-controller.js @@ -90,15 +90,9 @@ export class BareIssueishListController extends React.Component { return null; } - openOnGitHub = url => { - return new Promise((resolve, reject) => { - shell.openExternal(url, {}, err => { - if (err) { reject(err); } else { - resolve(); - addEvent('open-issueish-in-browser', {package: 'github', component: this.constructor.name}); - } - }); - }); + openOnGitHub = async url => { + await shell.openExternal(url); + addEvent('open-issueish-in-browser', {package: 'github', component: this.constructor.name}); } showActionsMenu = /* istanbul ignore next */ issueish => { diff --git a/lib/controllers/issueish-searches-controller.js b/lib/controllers/issueish-searches-controller.js index 1a9281db88..4d1d79b069 100644 --- a/lib/controllers/issueish-searches-controller.js +++ b/lib/controllers/issueish-searches-controller.js @@ -113,13 +113,8 @@ export default class IssueishSearchesController extends React.Component { }); } - onOpenSearch = search => { + onOpenSearch = async search => { const searchURL = search.getWebURL(this.props.remote); - - return new Promise((resolve, reject) => { - shell.openExternal(searchURL, {}, err => { - if (err) { reject(err); } else { resolve(); } - }); - }); + await shell.openExternal(searchURL); } } diff --git a/lib/controllers/remote-controller.js b/lib/controllers/remote-controller.js index 98f7a255f2..f0a38cc497 100644 --- a/lib/controllers/remote-controller.js +++ b/lib/controllers/remote-controller.js @@ -67,15 +67,7 @@ export default class RemoteController extends React.Component { createPrUrl += '/compare/' + encodeURIComponent(currentBranch.getName()); createPrUrl += '?expand=1'; - return new Promise((resolve, reject) => { - shell.openExternal(createPrUrl, {}, err => { - if (err) { - reject(err); - } else { - incrementCounter('create-pull-request'); - resolve(); - } - }); - }); + await shell.openExternal(createPrUrl); + incrementCounter('create-pull-request'); } } diff --git a/lib/views/actionable-review-view.js b/lib/views/actionable-review-view.js index aa92696ed1..888837db67 100644 --- a/lib/views/actionable-review-view.js +++ b/lib/views/actionable-review-view.js @@ -124,28 +124,17 @@ export default class ActionableReviewView extends React.Component { } } - reportAbuse = (commentUrl, author) => { - return new Promise((resolve, reject) => { - const url = 'https://github.com/contact/report-content?report=' + - `${encodeURIComponent(author)}&content_url=${encodeURIComponent(commentUrl)}`; - shell.openExternal(url, {}, err => { - if (err) { reject(err); } else { - resolve(); - addEvent('report-abuse', {package: 'github', component: this.constructor.name}); - } - }); - }); + reportAbuse = async (commentUrl, author) => { + const url = 'https://github.com/contact/report-content?report=' + + `${encodeURIComponent(author)}&content_url=${encodeURIComponent(commentUrl)}`; + + await shell.openExternal(url); + addEvent('report-abuse', {package: 'github', component: this.constructor.name}); } - openOnGitHub = url => { - return new Promise((resolve, reject) => { - shell.openExternal(url, {}, err => { - if (err) { reject(err); } else { - resolve(); - addEvent('open-comment-in-browser', {package: 'github', component: this.constructor.name}); - } - }); - }); + openOnGitHub = async url => { + await shell.openExternal(url); + addEvent('open-comment-in-browser', {package: 'github', component: this.constructor.name}); } showActionsMenu = (event, content, author) => { diff --git a/lib/views/issueish-link.js b/lib/views/issueish-link.js index 798ce814ea..80571c1bae 100644 --- a/lib/views/issueish-link.js +++ b/lib/views/issueish-link.js @@ -44,17 +44,9 @@ export function openIssueishLinkInNewTab(url, options = {}) { } } -export function openLinkInBrowser(uri) { - return new Promise((resolve, reject) => { - shell.openExternal(uri, {}, err => { - if (err) { - reject(err); - } else { - addEvent('open-issueish-in-browser', {package: 'github', from: 'issueish-link'}); - resolve(); - } - }); - }); +export async function openLinkInBrowser(uri) { + await shell.openExternal(uri); + addEvent('open-issueish-in-browser', {package: 'github', from: 'issueish-link'}); } function getAtomUriForGithubUrl(githubUrl) { From 4ab44f3054907c20189c26c23e8eaf35f57be436 Mon Sep 17 00:00:00 2001 From: sadick254 Date: Fri, 12 Feb 2021 08:39:44 +0300 Subject: [PATCH 09/29] Update shell.openExternal stubs --- test/controllers/issueish-list-controller.test.js | 6 +++--- test/controllers/remote-controller.test.js | 4 ++-- test/views/actionable-review-view.test.js | 11 +++++------ test/views/github-dotcom-markdown.test.js | 4 ++-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/test/controllers/issueish-list-controller.test.js b/test/controllers/issueish-list-controller.test.js index c5b7ab4e3d..13f4ffa07c 100644 --- a/test/controllers/issueish-list-controller.test.js +++ b/test/controllers/issueish-list-controller.test.js @@ -90,7 +90,7 @@ describe('IssueishListController', function() { it('calls shell.openExternal with specified url', async function() { const wrapper = shallow(buildApp()); - sinon.stub(shell, 'openExternal').callsArg(2); + sinon.stub(shell, 'openExternal').callsFake(() => { }); await wrapper.instance().openOnGitHub(url); assert.isTrue(shell.openExternal.calledWith(url)); @@ -98,7 +98,7 @@ describe('IssueishListController', function() { it('fires `open-issueish-in-browser` event upon success', async function() { const wrapper = shallow(buildApp()); - sinon.stub(shell, 'openExternal').callsArg(2); + sinon.stub(shell, 'openExternal').callsFake(() => {}); sinon.stub(reporterProxy, 'addEvent'); await wrapper.instance().openOnGitHub(url); @@ -109,7 +109,7 @@ describe('IssueishListController', function() { it('handles error when openOnGitHub fails', async function() { const wrapper = shallow(buildApp()); - sinon.stub(shell, 'openExternal').callsArgWith(2, new Error('oh noes')); + sinon.stub(shell, 'openExternal').throws(new Error('oh noes')); sinon.stub(reporterProxy, 'addEvent'); try { diff --git a/test/controllers/remote-controller.test.js b/test/controllers/remote-controller.test.js index 36e34cccf1..3028264145 100644 --- a/test/controllers/remote-controller.test.js +++ b/test/controllers/remote-controller.test.js @@ -52,7 +52,7 @@ describe('RemoteController', function() { it('increments a counter when onCreatePr is called', async function() { const wrapper = shallow(createApp()); - sinon.stub(shell, 'openExternal').callsArg(2); + sinon.stub(shell, 'openExternal').callsFake(() => {}); sinon.stub(reporterProxy, 'incrementCounter'); await wrapper.instance().onCreatePr(); @@ -62,7 +62,7 @@ describe('RemoteController', function() { it('handles error when onCreatePr fails', async function() { const wrapper = shallow(createApp()); - sinon.stub(shell, 'openExternal').callsArgWith(2, new Error('oh noes')); + sinon.stub(shell, 'openExternal').throws(new Error('oh noes')); sinon.stub(reporterProxy, 'incrementCounter'); try { diff --git a/test/views/actionable-review-view.test.js b/test/views/actionable-review-view.test.js index 0c5474cec0..598ad362e0 100644 --- a/test/views/actionable-review-view.test.js +++ b/test/views/actionable-review-view.test.js @@ -69,17 +69,17 @@ describe('ActionableReviewView', function() { } it("opens the content object's URL with 'Open on GitHub'", async function() { - sinon.stub(shell, 'openExternal').callsArg(2); + sinon.stub(shell, 'openExternal').callsFake(() => {}); const item = triggerMenu({url: 'https://github.com'}, {}).items.find(i => i.label === 'Open on GitHub'); await item.click(); - assert.isTrue(shell.openExternal.calledWith('https://github.com', {})); + assert.isTrue(shell.openExternal.calledWith('https://github.com')); assert.isTrue(reporterProxy.addEvent.calledWith('open-comment-in-browser')); }); it("rejects the promise when 'Open on GitHub' fails", async function() { - sinon.stub(shell, 'openExternal').callsArgWith(2, new Error("I don't feel like it")); + sinon.stub(shell, 'openExternal').throws(new Error("I don't feel like it")); const item = triggerMenu({url: 'https://github.com'}, {}).items.find(i => i.label === 'Open on GitHub'); await assert.isRejected(item.click()); @@ -87,7 +87,7 @@ describe('ActionableReviewView', function() { }); it('opens a prepopulated abuse-reporting link with "Report abuse"', async function() { - sinon.stub(shell, 'openExternal').callsArg(2); + sinon.stub(shell, 'openExternal').callsFake(() => {}); const item = triggerMenu({url: 'https://github.com/a/b'}, {login: 'tyrion'}) .items.find(i => i.label === 'Report abuse'); @@ -95,13 +95,12 @@ describe('ActionableReviewView', function() { assert.isTrue(shell.openExternal.calledWith( 'https://github.com/contact/report-content?report=tyrion&content_url=https%3A%2F%2Fgithub.com%2Fa%2Fb', - {}, )); assert.isTrue(reporterProxy.addEvent.calledWith('report-abuse')); }); it("rejects the promise when 'Report abuse' fails", async function() { - sinon.stub(shell, 'openExternal').callsArgWith(2, new Error('nah')); + sinon.stub(shell, 'openExternal').throws(new Error('nah')); const item = triggerMenu({url: 'https://github.com/a/b'}, {login: 'tyrion'}) .items.find(i => i.label === 'Report abuse'); diff --git a/test/views/github-dotcom-markdown.test.js b/test/views/github-dotcom-markdown.test.js index d8aa347f7e..014f584c66 100644 --- a/test/views/github-dotcom-markdown.test.js +++ b/test/views/github-dotcom-markdown.test.js @@ -213,7 +213,7 @@ describe('GithubDotcomMarkdown', function() { }); it('records event for opening issueish in browser', async function() { - sinon.stub(shell, 'openExternal').callsArg(2); + sinon.stub(shell, 'openExternal').callsFake(() => {}); sinon.stub(reporterProxy, 'addEvent'); const issueishLink = wrapper.getDOMNode().querySelector('a.issue-link'); @@ -228,7 +228,7 @@ describe('GithubDotcomMarkdown', function() { }); it('does not record event if opening issueish in browser fails', function() { - sinon.stub(shell, 'openExternal').callsArgWith(2, new Error('oh noes')); + sinon.stub(shell, 'openExternal').throws(new Error('oh noes')); sinon.stub(reporterProxy, 'addEvent'); // calling `handleClick` directly rather than dispatching event so that we can catch the error thrown and prevent errors in the console From 01dcf62afb2ae283defc96cb1c35a72ee826c085 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sat, 13 Feb 2021 19:00:15 +0100 Subject: [PATCH 10/29] changes to promise --- lib/views/directory-select.js | 8 +++----- lib/views/git-timings-view.js | 12 ++++++------ test/views/directory-select.test.js | 2 +- test/worker-manager.test.js | 2 +- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/views/directory-select.js b/lib/views/directory-select.js index e22137771f..daaff5c4df 100644 --- a/lib/views/directory-select.js +++ b/lib/views/directory-select.js @@ -45,15 +45,13 @@ export default class DirectorySelect extends React.Component { ); } - chooseDirectory = () => new Promise(resolve => { + chooseDirectory = () => this.props.showOpenDialog(this.props.currentWindow, { defaultPath: this.props.buffer.getText(), properties: ['openDirectory', 'createDirectory', 'promptToCreate'], - }, filePaths => { - if (filePaths !== undefined) { + }).then(({filePaths}) => { + if (filePaths.length) { this.props.buffer.setText(filePaths[0]); } - resolve(); }); - }); } diff --git a/lib/views/git-timings-view.js b/lib/views/git-timings-view.js index 6f1b6b88ce..6473368f40 100644 --- a/lib/views/git-timings-view.js +++ b/lib/views/git-timings-view.js @@ -328,9 +328,9 @@ class WaterfallWidget extends React.Component { const buffer = new TextBuffer({text: json}); dialog.showSaveDialog({ defaultPath: 'git-timings.json', - }, filename => { - if (!filename) { return; } - buffer.saveAs(filename); + }).then(({filePath}) => { + if (!filePath) { return; } + buffer.saveAs(filePath); }); } } @@ -423,9 +423,9 @@ export default class GitTimingsView extends React.Component { e.preventDefault(); dialog.showOpenDialog({ properties: ['openFile'], - }, async filenames => { - if (!filenames) { return; } - const filename = filenames[0]; + }).then(async ({filePaths}) => { + if (!filePaths.length) { return; } + const filename = filePaths[0]; try { const contents = await fs.readFile(filename, {encoding: 'utf8'}); const data = JSON.parse(contents); diff --git a/test/views/directory-select.test.js b/test/views/directory-select.test.js index 8e27125111..86a9e81dc6 100644 --- a/test/views/directory-select.test.js +++ b/test/views/directory-select.test.js @@ -24,7 +24,7 @@ describe('DirectorySelect', function() { {}} + showOpenDialog={() => Promise.resolve()} tabGroup={new TabGroup()} {...override} /> diff --git a/test/worker-manager.test.js b/test/worker-manager.test.js index 27932fe8bb..9fdf665f9e 100644 --- a/test/worker-manager.test.js +++ b/test/worker-manager.test.js @@ -167,7 +167,7 @@ describe('WorkerManager', function() { }); `; - await new Promise(resolve => browserWindow.webContents.executeJavaScript(script, resolve)); + await browserWindow.webContents.executeJavaScript(script); workerManager.destroy(true); workerManager = new WorkerManager(); From 1d9de0124e118b90d35046a8e266786d0ea980b3 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sat, 13 Feb 2021 19:17:37 +0100 Subject: [PATCH 11/29] fix a test --- test/views/directory-select.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/views/directory-select.test.js b/test/views/directory-select.test.js index 86a9e81dc6..b3a34097c3 100644 --- a/test/views/directory-select.test.js +++ b/test/views/directory-select.test.js @@ -47,7 +47,7 @@ describe('DirectorySelect', function() { describe('clicking the directory button', function() { it('populates the destination path buffer on accept', async function() { - const showOpenDialog = sinon.stub().callsArgWith(2, ['/some/directory/path']); + const showOpenDialog = sinon.stub().callsArgWith(2, {filePaths: ['/some/directory/path']}); const buffer = new TextBuffer({text: '/original'}); const wrapper = shallow(buildApp({showOpenDialog, buffer})); @@ -58,7 +58,7 @@ describe('DirectorySelect', function() { }); it('leaves the destination path buffer unmodified on cancel', async function() { - const showOpenDialog = sinon.stub().callsArgWith(2, undefined); + const showOpenDialog = sinon.stub().callsArgWith(2, {filePaths: undefined}); const buffer = new TextBuffer({text: '/original'}); const wrapper = shallow(buildApp({showOpenDialog, buffer})); From bd6b8fbc0ec6b9fe186bd45c1c71e8603e3f1505 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sat, 13 Feb 2021 19:23:37 +0100 Subject: [PATCH 12/29] ok now maybe fixed tests --- test/views/directory-select.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/views/directory-select.test.js b/test/views/directory-select.test.js index b3a34097c3..4755c8db24 100644 --- a/test/views/directory-select.test.js +++ b/test/views/directory-select.test.js @@ -47,7 +47,7 @@ describe('DirectorySelect', function() { describe('clicking the directory button', function() { it('populates the destination path buffer on accept', async function() { - const showOpenDialog = sinon.stub().callsArgWith(2, {filePaths: ['/some/directory/path']}); + const showOpenDialog = sinon.stub().returns(Promise.resolve({filePaths: ['/some/directory/path']})); const buffer = new TextBuffer({text: '/original'}); const wrapper = shallow(buildApp({showOpenDialog, buffer})); @@ -58,7 +58,7 @@ describe('DirectorySelect', function() { }); it('leaves the destination path buffer unmodified on cancel', async function() { - const showOpenDialog = sinon.stub().callsArgWith(2, {filePaths: undefined}); + const showOpenDialog = sinon.stub().returns(Promise.resolve({filePaths: undefined})); const buffer = new TextBuffer({text: '/original'}); const wrapper = shallow(buildApp({showOpenDialog, buffer})); From 50ddcb9c2b700e3e5adc7b6264bc75078331fbf6 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sat, 13 Feb 2021 19:37:24 +0100 Subject: [PATCH 13/29] damn hurry --- test/views/directory-select.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/views/directory-select.test.js b/test/views/directory-select.test.js index 4755c8db24..b371ccd426 100644 --- a/test/views/directory-select.test.js +++ b/test/views/directory-select.test.js @@ -58,7 +58,7 @@ describe('DirectorySelect', function() { }); it('leaves the destination path buffer unmodified on cancel', async function() { - const showOpenDialog = sinon.stub().returns(Promise.resolve({filePaths: undefined})); + const showOpenDialog = sinon.stub().returns(Promise.resolve({filePaths: []})); const buffer = new TextBuffer({text: '/original'}); const wrapper = shallow(buildApp({showOpenDialog, buffer})); From 0463c16d708ee544b16506788e1802937aaf77e1 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sun, 14 Feb 2021 17:58:31 +0100 Subject: [PATCH 14/29] use aync await syntax --- lib/views/directory-select.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/views/directory-select.js b/lib/views/directory-select.js index daaff5c4df..0f62c24a67 100644 --- a/lib/views/directory-select.js +++ b/lib/views/directory-select.js @@ -45,13 +45,13 @@ export default class DirectorySelect extends React.Component { ); } - chooseDirectory = () => - this.props.showOpenDialog(this.props.currentWindow, { + chooseDirectory = async () => { + const {filePaths} = await this.props.showOpenDialog(this.props.currentWindow, { defaultPath: this.props.buffer.getText(), properties: ['openDirectory', 'createDirectory', 'promptToCreate'], - }).then(({filePaths}) => { - if (filePaths.length) { - this.props.buffer.setText(filePaths[0]); - } }); + if (filePaths.length) { + this.props.buffer.setText(filePaths[0]); + } + } } From 44d5d8602657c3f57cd762f089d03974406382a2 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sun, 14 Feb 2021 18:17:09 +0100 Subject: [PATCH 15/29] more async await --- lib/views/git-timings-view.js | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/lib/views/git-timings-view.js b/lib/views/git-timings-view.js index 6473368f40..f689917673 100644 --- a/lib/views/git-timings-view.js +++ b/lib/views/git-timings-view.js @@ -322,16 +322,17 @@ class WaterfallWidget extends React.Component { this.setState(s => ({collapsed: !s.collapsed})); } - handleExportClick(e) { + async handleExportClick(e) { e.preventDefault(); const json = JSON.stringify(this.props.markers.map(m => m.serialize()), null, ' '); const buffer = new TextBuffer({text: json}); - dialog.showSaveDialog({ + const {filePath} = await dialog.showSaveDialog({ defaultPath: 'git-timings.json', - }).then(({filePath}) => { - if (!filePath) { return; } - buffer.saveAs(filePath); }); + if (!filePath) { + return; + } + buffer.saveAs(filePath); } } @@ -419,22 +420,23 @@ export default class GitTimingsView extends React.Component { ); } - handleImportClick(e) { + async handleImportClick(e) { e.preventDefault(); - dialog.showOpenDialog({ + const {filePaths} = await dialog.showOpenDialog({ properties: ['openFile'], - }).then(async ({filePaths}) => { - if (!filePaths.length) { return; } - const filename = filePaths[0]; - try { - const contents = await fs.readFile(filename, {encoding: 'utf8'}); - const data = JSON.parse(contents); - const restoredMarkers = data.map(item => Marker.deserialize(item)); - GitTimingsView.restoreGroup(restoredMarkers); - } catch (_err) { - atom.notifications.addError(`Could not import timings from ${filename}`); - } }); + if (!filePaths.length) { + return; + } + const filename = filePaths[0]; + try { + const contents = await fs.readFile(filename, {encoding: 'utf8'}); + const data = JSON.parse(contents); + const restoredMarkers = data.map(item => Marker.deserialize(item)); + GitTimingsView.restoreGroup(restoredMarkers); + } catch (_err) { + atom.notifications.addError(`Could not import timings from ${filename}`); + } } serialize() { From 3d5417784af152eba513f16b920c7470fb06d73b Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Tue, 16 Feb 2021 09:31:05 -0500 Subject: [PATCH 16/29] Prepare v0.36.8 release --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index d7bd334e87..b6adf61f63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "github", - "version": "0.36.7", + "version": "0.36.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f5b414f5e2..a2954dae04 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "github", "main": "./lib/index", - "version": "0.36.7", + "version": "0.36.8", "description": "GitHub integration", "repository": "https://github.com/atom/github", "license": "MIT", From 7113f206722435967de8049ea24a44a49846f42a Mon Sep 17 00:00:00 2001 From: sadick254 Date: Thu, 25 Feb 2021 22:41:12 +0300 Subject: [PATCH 17/29] Fix github failing tests for electron 9.4.1 upgrade --- test/views/github-dotcom-markdown.test.js | 1 + test/worker-manager.test.js | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/test/views/github-dotcom-markdown.test.js b/test/views/github-dotcom-markdown.test.js index 014f584c66..a34ad96296 100644 --- a/test/views/github-dotcom-markdown.test.js +++ b/test/views/github-dotcom-markdown.test.js @@ -140,6 +140,7 @@ describe('GithubDotcomMarkdown', function() { }); it('opens item in pane and activates accordingly', async function() { + atom.workspace = {open: () => {}}; sinon.stub(atom.workspace, 'open').returns(Promise.resolve()); const issueishLink = wrapper.getDOMNode().querySelector('a.issue-link'); diff --git a/test/worker-manager.test.js b/test/worker-manager.test.js index 27932fe8bb..515d54c1d7 100644 --- a/test/worker-manager.test.js +++ b/test/worker-manager.test.js @@ -151,23 +151,25 @@ describe('WorkerManager', function() { it('destroys all the renderer processes that were created', async function() { this.retries(5); // FLAKE - const browserWindow = new BrowserWindow({show: !!process.env.ATOM_GITHUB_SHOW_RENDERER_WINDOW, webPreferences: {nodeIntegration: true}}); + const browserWindow = new BrowserWindow({show: !!process.env.ATOM_GITHUB_SHOW_RENDERER_WINDOW, webPreferences: {nodeIntegration: true, enableRemoteModule: true}}); browserWindow.loadURL('about:blank'); sinon.stub(Worker.prototype, 'getWebContentsId').returns(browserWindow.webContents.id); const script = ` const ipc = require('electron').ipcRenderer; - ipc.on('${Worker.channelName}', function() { - const args = Array.prototype.slice.apply(arguments) - args.shift(); - - args.unshift('${Worker.channelName}'); - args.unshift(${remote.getCurrentWebContents().id}) - ipc.sendTo.apply(ipc, args); - }); + (function() { + ipc.on('${Worker.channelName}', function() { + const args = Array.prototype.slice.apply(arguments) + args.shift(); + + args.unshift('${Worker.channelName}'); + args.unshift(${remote.getCurrentWebContents().id}) + ipc.sendTo.apply(ipc, args); + }); + })() `; - await new Promise(resolve => browserWindow.webContents.executeJavaScript(script, resolve)); + await browserWindow.webContents.executeJavaScript(script); workerManager.destroy(true); workerManager = new WorkerManager(); From 853ea1968146ebb6963d9697c5b997261db7db8b Mon Sep 17 00:00:00 2001 From: darangi Date: Mon, 1 Mar 2021 18:02:34 +0100 Subject: [PATCH 18/29] Prepare v0.36.9 release --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b6adf61f63..016cdd9da5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "github", - "version": "0.36.8", + "version": "0.36.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a2954dae04..eaf4acf285 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "github", "main": "./lib/index", - "version": "0.36.8", + "version": "0.36.9", "description": "GitHub integration", "repository": "https://github.com/atom/github", "license": "MIT", From 7890946b18166c9c7fd5527e7253bc07e687cb4f Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Sat, 8 May 2021 00:20:04 -0600 Subject: [PATCH 19/29] Hotfix in restore discard history of files with same name --- lib/models/discard-history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/discard-history.js b/lib/models/discard-history.js index 3521ae3b81..1af7f263f7 100644 --- a/lib/models/discard-history.js +++ b/lib/models/discard-history.js @@ -127,7 +127,7 @@ export default class DiscardHistory { await this.expandBlobToFile(path.join(tempFolderPath, `${filePath}-before-discard`), beforeSha); const commonBasePath = !afterSha ? null : await this.expandBlobToFile(path.join(tempFolderPath, `${filePath}-after-discard`), afterSha); - const resultPath = path.join(tempFolderPath, `~${path.basename(filePath)}-merge-result`); + const resultPath = path.join(tempFolderPath, path.dirname(filePath), `~${path.basename(filePath)}-merge-result`); return {filePath, commonBasePath, theirsPath, resultPath, theirsSha: beforeSha, commonBaseSha: afterSha}; }); return await Promise.all(pathPromises); From 176fdc789def1012a80214a173cfdecbe89ebb58 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Sat, 8 May 2021 23:03:42 -0600 Subject: [PATCH 20/29] Use pre-existing dir variable in creating resultPath --- lib/models/discard-history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/discard-history.js b/lib/models/discard-history.js index 1af7f263f7..01a211212e 100644 --- a/lib/models/discard-history.js +++ b/lib/models/discard-history.js @@ -127,7 +127,7 @@ export default class DiscardHistory { await this.expandBlobToFile(path.join(tempFolderPath, `${filePath}-before-discard`), beforeSha); const commonBasePath = !afterSha ? null : await this.expandBlobToFile(path.join(tempFolderPath, `${filePath}-after-discard`), afterSha); - const resultPath = path.join(tempFolderPath, path.dirname(filePath), `~${path.basename(filePath)}-merge-result`); + const resultPath = path.join(dir, `~${path.basename(filePath)}-merge-result`); return {filePath, commonBasePath, theirsPath, resultPath, theirsSha: beforeSha, commonBaseSha: afterSha}; }); return await Promise.all(pathPromises); From 04d2b575143cc18c29db3365ee5b5d7ed0666bf8 Mon Sep 17 00:00:00 2001 From: steven nguyen Date: Thu, 13 May 2021 23:00:02 -0500 Subject: [PATCH 21/29] Clarify debug line --- lib/relay-network-layer-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/relay-network-layer-manager.js b/lib/relay-network-layer-manager.js index 0d359936b1..db77e0a56d 100644 --- a/lib/relay-network-layer-manager.js +++ b/lib/relay-network-layer-manager.js @@ -18,7 +18,7 @@ function logRatelimitApi(headers) { const resetsIn = moment.unix(parseInt(resets, 10)).from(); // eslint-disable-next-line no-console - console.debug(`GitHub API Rate Limit: ${remaining}/${total} — resets ${resetsIn}`); + console.debug(`GitHub API Rate Limiting Info: ${remaining}/${total} requests left — resets ${resetsIn}`); } export function expectRelayQuery(operationPattern, response) { From d78868820da77f6b6d2d4a4abfc464ec16d68729 Mon Sep 17 00:00:00 2001 From: steven nguyen Date: Fri, 14 May 2021 10:05:05 -0500 Subject: [PATCH 22/29] bump to ubuntu-latest which is currently `ubuntu-18.05` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b43c118f2e..25cb724a44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: name: tests strategy: matrix: - os: [ubuntu-18.04, macos-10.14, windows-latest] + os: [ubuntu-latest, macos-10.14, windows-latest] channel: [beta, nightly] fail-fast: false runs-on: ${{ matrix.os }} From 592142fa4136e94b56a9c7b01bb9f0b6d715c540 Mon Sep 17 00:00:00 2001 From: steven nguyen Date: Fri, 14 May 2021 10:08:31 -0500 Subject: [PATCH 23/29] Oops: Wrong os --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25cb724a44..0f3e43b3a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: name: tests strategy: matrix: - os: [ubuntu-latest, macos-10.14, windows-latest] + os: [ubuntu-18.04, macos-latest, windows-latest] channel: [beta, nightly] fail-fast: false runs-on: ${{ matrix.os }} From c3b4a01d6d54bb99db9e5bae9def2931f887cb1d Mon Sep 17 00:00:00 2001 From: sadick254 Date: Thu, 19 Aug 2021 19:16:54 +0300 Subject: [PATCH 24/29] Remote module defaults to false enableRemoteModule now defaults to false and is in the verge of being deprecated. https://www.electronjs.org/docs/breaking-changes#default-changed-enableremotemodule-defaults-to-false --- lib/worker-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker-manager.js b/lib/worker-manager.js index 409a1085e6..17b9588191 100644 --- a/lib/worker-manager.js +++ b/lib/worker-manager.js @@ -268,7 +268,7 @@ export class RendererProcess { this.onExecStarted = onExecStarted; this.win = new BrowserWindow({show: !!process.env.ATOM_GITHUB_SHOW_RENDERER_WINDOW, - webPreferences: {nodeIntegration: true}}); + webPreferences: {nodeIntegration: true, enableRemoteModule: true}}); this.webContents = this.win.webContents; // this.webContents.openDevTools(); From 9207c7b2a793327ae26b71f50fde4e63c50e9c5f Mon Sep 17 00:00:00 2001 From: sadick254 Date: Thu, 19 Aug 2021 21:12:25 +0300 Subject: [PATCH 25/29] Remove windows-build installation step --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f3e43b3a1..df3afbc826 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,11 +24,6 @@ jobs: with: channel: ${{ matrix.channel }} - - name: install windows build tools - if: contains(matrix.os, 'windows') - run: | - choco install visualcpp-build-tools --version=14.0.25420.1 --ignore-dependencies -y --params "'/IncludeRequired'" - echo "VCTargetsPath='C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140'" >> $GITHUB_ENV - name: install dependencies run: apm ci From 2053290edf225d02789913dadfcec0995685ba28 Mon Sep 17 00:00:00 2001 From: sadick254 Date: Thu, 19 Aug 2021 21:50:49 +0300 Subject: [PATCH 26/29] Prepare v0.36.10 release --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 016cdd9da5..cafe6d2056 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "github", - "version": "0.36.9", + "version": "0.36.10", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index eaf4acf285..c008cf5d55 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "github", "main": "./lib/index", - "version": "0.36.9", + "version": "0.36.10", "description": "GitHub integration", "repository": "https://github.com/atom/github", "license": "MIT", From 1d6057d6745470ceb7ca9bcc9a83eaec00da8942 Mon Sep 17 00:00:00 2001 From: steven nguyen Date: Mon, 25 Oct 2021 14:41:09 -0500 Subject: [PATCH 27/29] Don't use deprecated `Buffer` According to https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/, `Buffer(number)` should be replaced by `Buffer.alloc(number)` --- test/git-strategies.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/git-strategies.test.js b/test/git-strategies.test.js index c39b8dca60..3d7ad41b85 100644 --- a/test/git-strategies.test.js +++ b/test/git-strategies.test.js @@ -837,7 +837,7 @@ import * as reporterProxy from '../lib/reporter-proxy'; it('returns an empty diff', async function() { const workingDirPath = await cloneRepository('three-files'); const git = createTestStrategy(workingDirPath); - const data = new Buffer(10); + const data = Buffer.alloc(10); for (let i = 0; i < 10; i++) { data.writeUInt8(i + 200, i); } From f867d24b9a1feca7cc9190e696ff3608f68f07a5 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Sun, 17 Apr 2022 19:08:00 -0400 Subject: [PATCH 28/29] CI: Use 'windows-2019' image for Windows tests 'windows-latest' is currently 'windows-2022' with Visual Studio 2022. Old versions of node-gyp don't know how to find Visual Studio 2022, so the package build fails. Switch back to 'windows-2019' with Visual Studio 2019, which is supported by node-gyp 5.x, which apm still uses. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df3afbc826..7d30ce8063 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: name: tests strategy: matrix: - os: [ubuntu-18.04, macos-latest, windows-latest] + os: [ubuntu-18.04, macos-latest, windows-2019] channel: [beta, nightly] fail-fast: false runs-on: ${{ matrix.os }} From 5e72f801c134c713658773a90452f4bfb87c990f Mon Sep 17 00:00:00 2001 From: Musa Ibrahim Date: Wed, 28 Sep 2022 11:52:01 +0100 Subject: [PATCH 29/29] add sunset message --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e43d03aff3..d7d7d2b5ce 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# Atom GitHub Package +##### Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our [official announcement](https://github.blog/2022-06-08-sunsetting-atom/) + # Atom GitHub Package | Build | Code Coverage | |-------|---------------|