-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'remote-status' into master
- Loading branch information
Showing
19 changed files
with
3,416 additions
and
2,878 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", {"repo": "primer/github-vscode-theme"}], | ||
"commit": false, | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"github-vscode-theme": minor | ||
--- | ||
|
||
fix: add missing scope variable.other.enummember |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"github-vscode-theme": minor | ||
--- | ||
|
||
Update markdown inline code scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"github-vscode-theme": minor | ||
--- | ||
|
||
feat: add underline support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<details> | ||
<summary><strong>Colors changed</strong></summary> | ||
|
||
<!-- diff --><!-- /diff --> | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Posts a comment listing all the colors that changed in a PR | ||
name: Diff | ||
on: | ||
pull_request: | ||
branches-ignore: | ||
- 'test/**' | ||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
|
||
- name: Create comment (if necessary) | ||
uses: actions/github-script@v5 | ||
with: | ||
script: | | ||
const fs = require('fs') | ||
const body = fs.readFileSync('.github/diff_comment_template.md', 'utf8') | ||
const result = await github.rest.issues.listComments({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo | ||
}); | ||
console.log(result.data) | ||
const botComments = result.data.filter(c => c.user.login === 'github-actions[bot]') | ||
if (!botComments.length) { | ||
await github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body | ||
}) | ||
} | ||
diff: | ||
needs: comment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout base branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.base_ref }} | ||
path: base | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Install dependencies (base) | ||
run: pushd base; yarn; popd | ||
|
||
- name: Build (base) | ||
run: pushd base; yarn build; popd | ||
|
||
- name: Diff | ||
uses: primer/comment-token-update@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_USER: github-actions[bot] | ||
with: | ||
# This action will find the first comment by `github-actions[bot]` and | ||
# insert the diff data if `<!-- diff --><!-- /diff -->` is present in that comment. | ||
# If there are multiple comments by `github-actions[bot]` | ||
# or if `<!-- diff --><!-- /diff -->` is missing, | ||
# this action may not work as expected. | ||
comment-token: 'diff' | ||
script: | | ||
diff=$(for file in themes/*.json | ||
do | ||
diff -U 1 base/$file $file | ||
done) | ||
echo "\`\`\`diff" | ||
if [[ $diff ]] | ||
then | ||
echo "$diff" | ||
else | ||
echo "No colors changed" | ||
fi | ||
echo "\`\`\`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
jobs: | ||
release: | ||
name: Final | ||
if: ${{ github.repository == 'primer/github-vscode-theme' }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Create release pull request or publish to npm | ||
id: changesets | ||
uses: changesets/action@master | ||
with: | ||
title: Release Tracking | ||
# This expects you to have a script called release which does a build for your packages and calls changeset publish | ||
publish: yarn release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GPR_AUTH_TOKEN_SHARED }} | ||
VSCE_PAT: ${{ secrets.VSCE_PUBLISHER_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.DS_Store | ||
node_modules/ | ||
/themes/ | ||
package-lock.json | ||
build | ||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
.changeset/ | ||
.github/ | ||
.gitignore | ||
/node_modules/ | ||
/package-lock.json | ||
/src/ | ||
/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,47 @@ | ||
# GitHub's VS Code themes | ||
|
||
![GitHub VS Code theme](https://user-images.githubusercontent.com/378023/114663107-c1c97e00-9d34-11eb-8aa6-0c4f3d35af0b.png) | ||
![GitHub VS Code theme](https://user-images.githubusercontent.com/378023/132220037-3cd3e777-55a6-445f-9a2e-da6020ebd78d.png) | ||
|
||
## Install | ||
|
||
1. Go to [VS Marketplace](https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme). | ||
2. Click on the "Install" button. | ||
3. Then [select a theme](https://code.visualstudio.com/docs/getstarted/themes#_selecting-the-color-theme). Currently the following themes are available: | ||
- `GitHub Light` | ||
- `GitHub Dark` | ||
- `GitHub Light Default` ✨ new ✨ | ||
- `GitHub Dark Default` ✨ new ✨ | ||
- `GitHub Dark Dimmed` ✨ new ✨ | ||
3. Then [select a theme](https://code.visualstudio.com/docs/getstarted/themes#_selecting-the-color-theme). The GitHub themes try to match the themes available in [github.com's settings](https://github.com/settings/appearance): | ||
- `GitHub Light Default` | ||
- `GitHub Light High Contrast` ✨ new ✨ | ||
- `GitHub Light Colorblind` ✨ new ✨ | ||
- `GitHub Dark Default` | ||
- `GitHub Dark High Contrast` | ||
- `GitHub Dark Colorblind` ✨ new ✨ | ||
- `GitHub Dark Dimmed` | ||
|
||
Additionally, there are also two older themes. **Note**: They might not get updated frequently and are kept for legacy reasons: | ||
|
||
- `GitHub Light` (legacy) | ||
- `GitHub Dark` (legacy) | ||
|
||
## Override this theme | ||
|
||
To quickly test something, you can also override this (or any other) theme in your personal config file. Please follow the guide in the [color theme](https://code.visualstudio.com/api/extension-guides/color-theme) documentation. | ||
To override this (or any other) theme in your personal config file, please follow the guide in the [color theme](https://code.visualstudio.com/api/extension-guides/color-theme) documentation. This is handy for small tweaks to the theme without having to fork and maintain your own theme. | ||
|
||
## Contribute | ||
|
||
1. Clone and open this [repo](https://github.com/primer/github-vscode-theme) in VS Code | ||
2. Run `npm install` to install the Primer CSS color reference and run `npm start` to run the converter. | ||
2. Run `yarn` to install the dependencies. | ||
3. Press `F5` to open a new window with your extension loaded | ||
4. Open `Code > Preferences > Color Theme` [`⌘k ⌘t`] and pick the "GitHub Light" or "GitHub Dark" theme | ||
4. Open `Code > Preferences > Color Theme` [`⌘k ⌘t`] and pick the "GitHub ..." theme you want to test. Note: It seems this has to be done 2x because the first time it switches back to the default light theme. This might be a bug? | ||
5. Make changes to the [`/src/theme.js`](https://github.com/primer/github-vscode-theme/blob/master/src/theme.js) file. | ||
- **UI**: For all changes to the "outer UI", like (status bar, file navigation etc.), take a look at the [Theme Color](https://code.visualstudio.com/api/references/theme-color) reference. | ||
- **Syntax**: For changes to the "code highlighting", examine the syntax scopes by invoking the [`Developer: Inspect Editor Tokens and Scopes`](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#scope-inspector) command from the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) in the Extension Development Host window. | ||
6. Commit your changes and open a PR. | ||
6. Run `yarn build` to update the theme. You can also run `yarn start` instead to automatically rebuild the theme while making changes and no reloading should be necessary. | ||
7. Once you're happy, commit your changes and open a PR. | ||
|
||
Note: | ||
|
||
- If possible use colors from [Primer's color system](https://primer.style/css/support/color-system). | ||
- Changes to the theme files are automatically applied to the Extension Development Host window, so no reloading should be necessary. | ||
- If possible use colors from [Primer's color system](https://primer.style/primitives/colors). | ||
|
||
## Publish (internal) | ||
|
||
> Note: Publishing a new version of this theme is only meant for maintainers. | ||
**Prerequisite**: Please follow this [guide](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) to install and login to `vsce`. Ask an existing maintainer how to get the "Personal Access Token". | ||
|
||
1. Merge any PR that is ready to be published into `master`. | ||
2. Run `npm run build` to generate the themes with the new changes. | ||
3. Update [CHANGELOG.md](https://github.com/primer/github-vscode-theme/blob/master/CHANGELOG.md) + commit the changes. | ||
4. Run `vsce publish [version]`. Follow the [SemVer](https://semver.org) convention and replace `[version]` with one of the following options: | ||
- `patch` for bug fixes | ||
- `minor` for improvements | ||
- `major` for breaking or bigger changes | ||
5. Push the commits and make a [new release](https://github.com/primer/github-vscode-theme/releases/new). | ||
This repo uses [changesets](https://github.com/atlassian/changesets) to automatically make updates to [CHANGELOG.md](https://github.com/primer/github-vscode-theme/blob/main/CHANGELOG.md) and publish a new version to the [VS Marketplace](https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme). |
Oops, something went wrong.