Skip to content

Commit

Permalink
Merge pull request #14174 from desktop/region-aware-number-formatting
Browse files Browse the repository at this point in the history
Number formatting using Intl.* APIs
  • Loading branch information
niik committed Apr 13, 2023
2 parents 9548385 + 935c44e commit b80b5ea
Show file tree
Hide file tree
Showing 464 changed files with 22,249 additions and 8,011 deletions.
7 changes: 0 additions & 7 deletions .codecov.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# These folders contain scripts to enhance the code coverage reports and are
# already ignored by .gitignore, but because they live under app and script they
# might be included when linting
app/coverage
script/coverage
node_modules
app/node_modules
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ extends:
- prettier/react
- plugin:@typescript-eslint/recommended
- prettier/@typescript-eslint
- plugin:github/react

rules:
##########
Expand All @@ -29,6 +30,7 @@ rules:
###########
# PLUGINS #
###########

# TYPESCRIPT
'@typescript-eslint/naming-convention':
- error
Expand Down
3 changes: 1 addition & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ reports :mag_right:.
Before creating bug reports, please check [this list](#before-submitting-a-bug-report)
as you might find out that you don't need to create one. When you are creating
a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report).
Fill out [the required template](ISSUE_TEMPLATE/bug_report.md), the information
it asks for helps us resolve issues faster.
Fill out the required template, the information it asks for helps us resolve issues faster.

#### Before Submitting A Bug Report

Expand Down
11 changes: 1 addition & 10 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@ body:
- type: markdown
attributes:
value: |
Thanks for filing a bug report! This issue tracker is for [GitHub Desktop](https://desktop.github.com). If you are experiencing issues with the Linux fork of GitHub Desktop please open an issue [in its repository](https://github.com/shiftkey/desktop). If you are experiencing issues with github.com please [contact GitHub Support](https://support.github.com/).
- type: checkboxes
id: existing-issues
attributes:
label: Search existing issues
options:
- label:
I have searched the issue tracker and confirmed that I was unable to
find existing issues for the problem I am experiencing.
required: true
Thanks for filing a bug report! This issue tracker is for [GitHub Desktop](https://desktop.github.com). Please search the issue tracker to see if there is an existing issue for the problem you are experiencing. If you are experiencing issues with the Linux fork of GitHub Desktop please open an issue [in its repository](https://github.com/shiftkey/desktop). If you are experiencing issues with github.com please [contact GitHub Support](https://support.github.com/).
- type: textarea
id: the-problem
attributes:
Expand Down
11 changes: 1 addition & 10 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@ body:
- type: markdown
attributes:
value: |
Thanks for submitting a feature request! This issue tracker is for [GitHub Desktop](https://desktop.github.com). If you have a feature request for github.com please visit the [GitHub public feedback discussions repository](https://github.com/github/feedback/discussions).
- type: checkboxes
id: existing-feature-requests
attributes:
label: Search for existing feature requests
options:
- label:
I have searched the issue tracker and confirmed that I was unable to
find existing issues for the feature I am requesting.
required: true
Thanks for submitting a feature request! This issue tracker is for [GitHub Desktop](https://desktop.github.com). Please search the issue tracker to see if there is an existing issue for the feature you are requesting. If you have a feature request for github.com please visit the [GitHub public feedback discussions repository](https://github.com/github/feedback/discussions).
- type: textarea
id: the-feature-request
attributes:
Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
16 changes: 0 additions & 16 deletions .github/no-response.yml

This file was deleted.

33 changes: 10 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,24 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16.13.0]
os: [macos-10.15, windows-2019]
node: [16.17.1]
os: [macos-11, windows-2019]
arch: [x64, arm64]
include:
- os: macos-10.15
- os: macos-11
friendlyName: macOS
- os: windows-2019
friendlyName: Windows
timeout-minutes: 60
env:
# Needed for macOS arm64 until hosted macos-11.0 runners become available
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn-
cache: yarn

# This step can be removed as soon as official Windows arm64 builds are published:
# https://github.com/nodejs/build/issues/2450#issuecomment-705853342
Expand All @@ -60,6 +45,8 @@ jobs:
env:
npm_config_arch: ${{ matrix.arch }}
TARGET_ARCH: ${{ matrix.arch }}
- name: Validate Electron version
run: yarn run validate-electron-version
- name: Lint
run: yarn lint
- name: Validate changelog
Expand All @@ -83,10 +70,10 @@ jobs:
run: yarn test:setup
- name: Run unit tests
if: matrix.arch == 'x64'
run: yarn test:unit:cov
run: yarn test:unit
- name: Run script tests
if: matrix.arch == 'x64'
run: yarn test:script:cov
run: yarn test:script
- name: Publish production app
run: yarn run publish
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
config-file: ./.github/codeql/codeql-config.yml

Expand All @@ -32,7 +32,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -46,4 +46,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
32 changes: 32 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: No Response

# Both `issue_comment` and `scheduled` event types are required for this Action
# to work properly.
on:
issue_comment:
types: [created]
schedule:
# Schedule for five minutes after the hour, every hour
- cron: '5 * * * *'

permissions:
issues: write

jobs:
noResponse:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/no-response@v0.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
closeComment: >
Thank you for your issue!
We haven’t gotten a response to our questions above. With only the
information that is currently in the issue, we don’t have enough
information to take action. We’re going to close this but don’t
hesitate to reach out if you have or find the answers we need. If
you answer our questions above, this issue will automatically
reopen.
daysUntilClose: 7
responseRequiredLabel: more-info-needed
49 changes: 49 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Create Release Pull Request'

on: create

jobs:
build:
name: Create Release Pull Request
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
if: |
startsWith(github.ref, 'refs/heads/releases/') && !contains(github.ref, 'test')
- name: Create Pull Request content
if: |
startsWith(github.ref, 'refs/heads/releases/') && !contains(github.ref, 'test')
run: |
PR_TITLE=`./script/draft-release/release-pr-content.sh title ${GITHUB_REF#refs/heads/}`
PR_BODY=`./script/draft-release/release-pr-content.sh body ${GITHUB_REF#refs/heads/}`
echo "PR_BODY<<EOF" >> $GITHUB_ENV
echo "$PR_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "PR_TITLE<<EOF" >> $GITHUB_ENV
echo "$PR_TITLE" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- uses: tibdex/github-app-token@v1
id: generate-token
if: |
startsWith(github.ref, 'refs/heads/releases/') && !contains(github.ref, 'test')
with:
app_id: ${{ secrets.DESKTOP_RELEASES_APP_ID }}
private_key: ${{ secrets.DESKTOP_RELEASES_APP_PRIVATE_KEY }}

- name: Create Release Pull Request
uses: peter-evans/create-pull-request@v4.2.4
if: |
startsWith(github.ref, 'refs/heads/releases/') && !contains(github.ref, 'test')
with:
token: ${{ steps.generate-token.outputs.token }}
title: ${{ env.PR_TITLE }}
body: ${{ env.PR_BODY }}
branch: ${{ github.ref }}
base: development
draft: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ app/node_modules/
.awcache
.idea/
.vs/
.vscode/*.log
.eslintcache
*.iml
.envrc
Expand Down
2 changes: 2 additions & 0 deletions .markdownlint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const markdownlintGitHub = require('@github/markdownlint-github')
module.exports = markdownlintGitHub.init()
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.0
16.17.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.0
v16.17.1
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python 3.9.5
nodejs 16.13.0
nodejs 16.17.1
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
# [GitHub Desktop](https://desktop.github.com)

[GitHub Desktop](https://desktop.github.com/) is an open source [Electron](https://www.electronjs.org/)-based
GitHub app. It is written in [TypeScript](http://www.typescriptlang.org) and
GitHub app. It is written in [TypeScript](https://www.typescriptlang.org) and
uses [React](https://reactjs.org/).

![GitHub Desktop screenshot - Windows](https://cloud.githubusercontent.com/assets/359239/26094502/a1f56d02-3a5d-11e7-8799-23c7ba5e5106.png)
<picture>
<source
srcset="https://user-images.githubusercontent.com/634063/202742848-63fa1488-6254-49b5-af7c-96a6b50ea8af.png"
media="(prefers-color-scheme: dark)"
/>
<img
width="1072"
src="https://user-images.githubusercontent.com/634063/202742985-bb3b3b94-8aca-404a-8d8a-fd6a6f030672.png"
alt="A screenshot of the GitHub Desktop application showing changes being viewed and committed with two attributed co-authors"
/>
</picture>

## Where can I get it?

Download the official installer for your operating system:

- [macOS](https://central.github.com/deployments/desktop/desktop/latest/darwin)
- [macOS (Apple Silicon)](https://central.github.com/deployments/desktop/desktop/latest/darwin-arm64)
- [macOS (Apple silicon)](https://central.github.com/deployments/desktop/desktop/latest/darwin-arm64)
- [Windows](https://central.github.com/deployments/desktop/desktop/latest/win32)
- [Windows machine-wide install](https://central.github.com/deployments/desktop/desktop/latest/win32?format=msi)

Expand All @@ -31,18 +41,17 @@ Want to test out new features and get fixes before everyone else? Install the
beta channel to get access to early builds of Desktop:

- [macOS](https://central.github.com/deployments/desktop/desktop/latest/darwin?env=beta)
- [macOS (Apple Silicon)](https://central.github.com/deployments/desktop/desktop/latest/darwin-arm64?env=beta)
- [macOS (Apple silicon)](https://central.github.com/deployments/desktop/desktop/latest/darwin-arm64?env=beta)
- [Windows](https://central.github.com/deployments/desktop/desktop/latest/win32?env=beta)
- [Windows (ARM64)](https://central.github.com/deployments/desktop/desktop/latest/win32-arm64?env=beta)

The release notes for the latest beta versions are available [here](https://desktop.github.com/release-notes/?env=beta).

### Community Releases

There are several community-supported package managers that can be used to
install GitHub Desktop:
- Windows users can install using [Chocolatey](https://chocolatey.org/) package manager:
`c:\> choco install github-desktop`
- Windows users can install using [winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/) `c:\> winget install github-desktop` or [Chocolatey](https://chocolatey.org/) `c:\> choco install github-desktop`
- macOS users can install using [Homebrew](https://brew.sh/) package manager:
`$ brew install --cask github`

Expand Down Expand Up @@ -85,12 +94,15 @@ resources relevant to the project.

If you're looking for something to work on, check out the [help wanted](https://github.com/desktop/desktop/issues?q=is%3Aissue+is%3Aopen+label%3A%22help%20wanted%22) label.

## Building Desktop

To setup your development environment for building Desktop, check out: [`setup.md`](./docs/contributing/setup.md).

## More Resources

See [desktop.github.com](https://desktop.github.com) for more product-oriented
information about GitHub Desktop.


See our [getting started documentation](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/overview/getting-started-with-github-desktop) for more information on how to set up, authenticate, and configure GitHub Desktop.

## License
Expand Down
11 changes: 11 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
GitHub takes the security of our software products and services seriously, including the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub).

If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways.

If the vulnerability you have found is *not* [in scope for the GitHub Bug Bounty Program](https://bounty.github.com/#scope) or if you do not wish to be considered for a bounty reward, please report the issue to us directly using [private vulnerability reporting](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability).

If the vulnerability you have found is [in scope for the GitHub Bug Bounty Program](https://bounty.github.com/#scope) and you would like for your finding to be considered for a bounty reward, please submit the vulnerability to us through [HackerOne](https://hackerone.com/github) in order to be eligible to receive a bounty award.

**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**

Thanks for helping make GitHub safe for everyone.
4 changes: 2 additions & 2 deletions app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
runtime = electron
disturl = https://atom.io/download/electron
target = 17.0.1
disturl = https://electronjs.org/headers
target = 22.0.0

0 comments on commit b80b5ea

Please sign in to comment.