Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
conwnet committed Mar 4, 2021
2 parents 82c45dc + d6d51a6 commit d6ca5fd
Show file tree
Hide file tree
Showing 40 changed files with 1,617 additions and 836 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Configuration for welcome - https://github.com/behaviorbot/welcome

# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
# Comment to be posted to on first time issues

newIssueWelcomeComment: >
Hello there!👋 Welcome to the project!💖
Thank you and congrats🎉for opening your very first issue in this project.Be patient while we get back to you.😄
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
# Comment to be posted to on PRs from first time contributors in your repository

newPRWelcomeComment: >
Hello there!👋 Welcome to the project!💖
Thank you and congrats🎉 for opening your first pull request✨ 🙌.We will get back to you as soon as we can.😄
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
# Comment to be posted to on pull requests merged by a first time user

firstPRMergeComment: >
Congrats on merging your first pull request! 🎉🎉🎉 We here at github1s are proud of you!
6 changes: 6 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM gitpod/workspace-full

RUN sudo apt-get update \
&& sudo apt-get install -y \
g++ gcc make python2.7 pkg-config libx11-dev libxkbfile-dev libsecret-1-dev python-is-python3 rsync \
&& sudo rm -rf /var/lib/apt/lists/*
38 changes: 38 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
image:
file: .gitpod.Dockerfile
tasks:
- init: |
yarn
yarn build
mkdir -p lib/vscode/out
sed -i 's/The Web Worker Extension Host did not start in 10s/The Web Worker Extension Host did not start in 60s/g' ./lib/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts
sed -i 's/}, 10000);/}, 60000);/g' ./lib/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts
command: |
echo "======================="
echo "Please run 'yarn watch'"
echo "======================="
- command: |
echo "==========================================================================="
echo "Please wait for 'yarn watch' to complete compilation, then run 'yarn serve'"
echo "==========================================================================="
ports:
- port: 5000
onOpen: open-browser
github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: true
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: false
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: false
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ javascript: window.location.href = window.location.href.replace(/github(1s)?.com
- [How it works](https://github.com/conwnet/github1s/blob/master/docs/guide.md)
- [Roadmap](https://github.com/conwnet/github1s/projects/1)

## Enabling Private Repositories

If you want to view non-public repositories, you need to add an OAuth token. The token is stored only in your browser, and only send to GitHub when fetching your repository's files. Click on the icon near the bottom of the left-hand row of icons, and the dialog box will prompt you for it, and even take you to your GitHub settings page to generate one, if needed.

![VS Code - GitHub1s](https://raw.githubusercontent.com/timbaileyjones/github1s/master/resources/images/auth-token.png)

## Screenshots

![VS Code - GitHub1s](https://raw.githubusercontent.com/mohitjaisal/github1s/master/resources/images/Github1sDemo1.gif)
Expand All @@ -35,6 +41,14 @@ javascript: window.location.href = window.location.href.replace(/github(1s)?.com

## Development

### Cloud-based development

You can start an online development environment with [Gitpod](https://www.gitpod.io) by clicking the following button:

[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/conwnet/github1s)

### Local development

You need [these prerequisites (the same ones as for VS Code)](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites) for development.

```bash
Expand Down Expand Up @@ -87,6 +101,16 @@ $ yarn build

- If you have a question, [discuss on gitter](https://gitter.im/conwnet/github1s)

## Project Sponsors

The continued development and maintenance of GitHub1s is made possible by these generous sponsors:

<br />
<a href="https://vercel.com/?utm_source=vscode-github1s&utm_campaign=oss">
<img src="https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/vercel-logo.svg">
</a>
<br /><br />

## Third-party Related Projects

### Chrome Extensions
Expand Down Expand Up @@ -115,3 +139,13 @@ $ yarn build
### Tampermonkey scripts

- [Mr-B0b/TamperMonkeyScripts/vscode.js](https://github.com/Mr-B0b/TamperMonkeyScripts/blob/main/vscode.js)

### Maintainers! :blush:

<table>
<tbody><tr>
<td align="center"><a href="https://github.com/conwnet"><img alt="" src="https://avatars.githubusercontent.com/conwnet" width="100px;"><br><sub><b>netcon</b></sub></a><br><a href="https://github.com/conwnet/github1s/commits?author=conwnet" title="Code">💻 🖋</a></td> </a></td>
<td align="center"><a href="https://github.com/xcv58"><img alt="" src="https://avatars.githubusercontent.com/xcv58" width="100px;"><br><sub><b>xcv58</b></sub></a><br><a href="https://github.com/conwnet/github1s/commits?author=xcv58" title="Code">💻 🖋</a></td></a></td>
<td align="center"><a href="https://github.com/Siddhant-K-code"><img alt="" src="https://avatars.githubusercontent.com/Siddhant-K-code" width="100px;"><br><sub><b>Siddhant Khare</b></sub></a><br><a href="https://github.com/conwnet/github1s/commits?author=Siddhant-K-code" title="Code">💻 🖋</a></td> </a></td>
</tr>
</tbody></table>
4 changes: 3 additions & 1 deletion docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ According to the above, obviously, the core concept of GitHub1s is to implement

_We may switch to the GitHub GraphQL API for more friendly user experience in the future, thanks to @xcv58 and @kanhegaonkarsaurabh. See details at [Issue 12](https://github.com/conwnet/github1s/issues/12)._

GitHub1s is a purely static web app (because it really doesn't need a backend service, does it?). So we just deploy it on [GitHub Pages](https://pages.github.com/) now (the `gh-pages` branch of this repository), and it is free. The service of GitHub1s could be reliable (GitHub is very reliable) because nobody needs to pay the web hosting bills.
~~GitHub1s is a purely static web app (because it really doesn't need a backend service, does it?). So we just deploy it on [GitHub Pages](https://pages.github.com/) now (the `gh-pages` branch of this repository), and it is free. The service of GitHub1s could be reliable (GitHub is very reliable) because nobody needs to pay the web hosting bills.~~

We deploy GitHub1s on [Vercel](https://vercel.com/) now for minimize delays in loading and better developer experience. Thanks for the wonderful service provide by Vercel.

# Rate Limit

Expand Down
3 changes: 3 additions & 0 deletions extensions/github1s/extension.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module.exports = /** @type WebpackConfig */ {
resolve: {
mainFields: ['module', 'main'],
extensions: ['.ts', '.js'], // support ts-files and js-files
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
module: {
rules: [
Expand Down
6 changes: 3 additions & 3 deletions extensions/github1s/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
*/

import * as vscode from 'vscode';
import { getExtensionContext } from '@/helpers/context';
import {
getExtensionContext,
getRepositoryBranchRefs,
getRepositoryTagRefs,
getCurrentRef,
getCurrentAuthority,
changeCurrentRef,
} from './util';
import { validateToken } from './api';
} from '@/helpers/git-ref';
import { validateToken } from '@/interfaces/github-api-rest';

export const commandValidateToken = (silent: boolean = false) => {
const context = getExtensionContext();
Expand Down
47 changes: 42 additions & 5 deletions extensions/github1s/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,63 @@
*/

import * as vscode from 'vscode';
import { GitHub1sFS } from './github1sfs';
import { SettingsView } from './settings-view';
import { setExtensionContext } from './util';
import { SettingsView } from '@/views/settings-view';
import { setExtensionContext } from '@/helpers/context';
import {
commandUpdateToken,
commandValidateToken,
commandClearToken,
commandSwitchBranch,
commandSwitchTag,
commandGetCurrentAuthority,
} from './commands';
} from '@/commands';
import {
GitHub1sFileSystemProvider,
GitHub1sFileSearchProvider,
// GitHub1sTextSearchProvider,
GitHub1sSubmoduleDecorationProvider,
} from '@/providers';
import { showSponsors } from '@/sponsors';

export function activate(context: vscode.ExtensionContext) {
setExtensionContext(context);
context.subscriptions.push(new GitHub1sFS());

// providers
const fsProvider = new GitHub1sFileSystemProvider();
context.subscriptions.push(
vscode.workspace.registerFileSystemProvider(
GitHub1sFileSystemProvider.scheme,
fsProvider,
{
isCaseSensitive: true,
isReadonly: true,
}
),
vscode.workspace.registerFileSearchProvider(
GitHub1sFileSearchProvider.scheme,
new GitHub1sFileSearchProvider(fsProvider)
),
// TODO: The Code Search ability is powered by Sourcegraph
// We are actively in touch with the Sourcegraph Team
// It will be enabled if we get their permission
// vscode.workspace.registerTextSearchProvider(
// GitHub1sTextSearchProvider.scheme,
// new GitHub1sTextSearchProvider()
// ),
vscode.window.registerFileDecorationProvider(
new GitHub1sSubmoduleDecorationProvider(fsProvider)
)
);

// views
context.subscriptions.push(
vscode.window.registerWebviewViewProvider(
SettingsView.viewType,
new SettingsView()
)
);

// commands
context.subscriptions.push(
vscode.commands.registerCommand(
'github1s.validate-token',
Expand Down Expand Up @@ -54,4 +88,7 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(
vscode.commands.registerCommand('github1s.switch-tag', commandSwitchTag)
);

// sponsors in Status Bar
showSponsors();
}
Loading

1 comment on commit d6ca5fd

@vercel
Copy link

@vercel vercel bot commented on d6ca5fd Mar 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.