From 8b472f9c1a17cdeca7102bcce73af8a0a4dc1464 Mon Sep 17 00:00:00 2001 From: Steve Ward Date: Tue, 15 Dec 2020 12:20:48 -0500 Subject: [PATCH 1/3] Add shortcut for committing in GitHub Desktop (#16970) Co-authored-by: Laura Coursen --- .../keyboard-shortcuts.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/desktop/installing-and-configuring-github-desktop/keyboard-shortcuts.md b/content/desktop/installing-and-configuring-github-desktop/keyboard-shortcuts.md index 65d9855c81..e4faef6567 100644 --- a/content/desktop/installing-and-configuring-github-desktop/keyboard-shortcuts.md +++ b/content/desktop/installing-and-configuring-github-desktop/keyboard-shortcuts.md @@ -51,6 +51,7 @@ GitHub Desktop keyboard shortcuts on macOS |2 | Show your commit history |B | Show all your branches |G | Go to the commit summary field +|Enter | Commit changes when summary or description field is active |space| Select or deselect all highlighted files |N | Create a new branch |R | Rename the current branch @@ -104,6 +105,7 @@ GitHub Desktop keyboard shortcuts on Windows |Ctrl2 | Show your commit history |CtrlB | Show all your branches |CtrlG | Go to the commit summary field +|CtrlEnter | Commit changes when summary or description field is active |space| Select or deselect all highlighted files |CtrlShiftN | Create a new branch |CtrlShiftR | Rename the current branch From f176694ec38239602750478590f7b4d1b643cf84 Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Tue, 15 Dec 2020 09:30:10 -0800 Subject: [PATCH 2/3] unallowed workflow updates (#16968) --- .../triage-unallowed-contributions.yml | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/.github/workflows/triage-unallowed-contributions.yml b/.github/workflows/triage-unallowed-contributions.yml index cb2e22b067..9e11f0b237 100644 --- a/.github/workflows/triage-unallowed-contributions.yml +++ b/.github/workflows/triage-unallowed-contributions.yml @@ -1,7 +1,17 @@ name: Check unallowed file changes on: - push: + pull_request: + paths: + - '.github/workflows/**' + - '.github/CODEOWNERS' + - 'translations/**' + - 'assets/fonts/**' + - 'data/graphql/**' + - 'lib/graphql/**' + - 'lib/redirects/**' + - 'lib/rest/**' + - 'lib/webhooks/**' jobs: triage: @@ -9,19 +19,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - - name: Get pull request number - id: pull-number - uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - result-encoding: string - script: | - const pulls = await github.repos.listPullRequestsAssociatedWithCommit({ - ...context.repo, - commit_sha: context.sha - }) - - return pulls.data.map(pull => pull.number).shift() - name: Check for existing requested changes id: requested-change uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9 @@ -31,13 +28,19 @@ jobs: script: | const pullReviews = await github.pulls.listReviews({ ...context.repo, - pull_number: ${{steps.pull-number.outputs.result}} + pull_number: context.payload.number }) - return pullReviews.data + const botReviews = pullReviews.data .filter(review => review.user.login === 'github-actions[bot]') .sort((a, b) => new Date(b.submitted_at) - new Date(a.submitted_at)) .shift() + + if (botReviews) { + console.log(`Pull request reviews authored by the github-action bot: ${botReviews}`) + } + return botReviews + - name: Get files changed uses: dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58 id: filter @@ -89,7 +92,7 @@ jobs: if (translationFiles.length > 0) { await github.issues.addLabels({ ...context.repo, - issue_number: ${{steps.pull-number.outputs.result}}, + issue_number: context.payload.number, labels: ['localization'] }) reviewMessage += "\n\nIt looks like you've modified translated content. Unfortunately, we are not able to accept pull requests for translated content. Our translation process involves an integration with an external service at crowdin.com, where all translation activity happens. We hope to eventually open up the translation process to the open source community, but we're not there yet. See https://github.com/github/docs/blob/main/CONTRIBUTING.md#earth_asia-translations for more details." @@ -97,21 +100,23 @@ jobs: await github.pulls.createReview({ ...context.repo, - pull_number: ${{steps.pull-number.outputs.result}}, + pull_number: context.payload.number, body: reviewMessage, event: 'REQUEST_CHANGES' }) # When the most recent review was CHANGES_REQUESTED and the existing # PR no longer contains unallowed changes, dismiss the previous review - name: Dismiss pull request review - if: ${{ steps.filter.outputs.notAllowed == 'false' && fromJson(steps.requested-change.outputs.result).state == 'CHANGES_REQUESTED' }} + # Check that unallowed files aren't modified and that a + # CHANGES_REQUESTED review already exists + if: ${{ steps.filter.outputs.notAllowed == 'false' && steps.requested-change.outputs.result && fromJson(steps.requested-change.outputs.result).state == 'CHANGES_REQUESTED' }} uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | await github.pulls.dismissReview({ ...context.repo, - pull_number: ${{steps.pull-number.outputs.result}}, + pull_number: context.payload.number, review_id: ${{fromJson(steps.requested-change.outputs.result).id}}, message: `✨Looks like you reverted all files we don't accept contributions for. 🙌 A member of the docs team will review your PR soon. 🚂` }) From a8bfd0a3248431ba6db5bd77831db27010a6031b Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Tue, 15 Dec 2020 10:01:31 -0800 Subject: [PATCH 3/3] Remove double pull_request property (#16974) --- .github/workflows/triage-unallowed-contributions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triage-unallowed-contributions.yml b/.github/workflows/triage-unallowed-contributions.yml index 9e11f0b237..c89214f6de 100644 --- a/.github/workflows/triage-unallowed-contributions.yml +++ b/.github/workflows/triage-unallowed-contributions.yml @@ -15,7 +15,7 @@ on: jobs: triage: - if: github.repository == 'github/docs' && github.event.pull_request.pull_request.user.login != 'Octomerger' + if: github.repository == 'github/docs' && github.event.pull_request.user.login != 'Octomerger' runs-on: ubuntu-latest steps: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f