Skip to content

Commit

Permalink
added open source code
Browse files Browse the repository at this point in the history
  • Loading branch information
hassan-pullflow committed Oct 19, 2023
0 parents commit 2dfa578
Show file tree
Hide file tree
Showing 67 changed files with 8,279 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SESSIONS_SECRET_KEY=(string) # Session secret key for extension, e.g. "session_secret_key"
PULLFLOW_APP_URL=(url) # Hostname for the Pullflow API server, e.g. https://app.pullflow.com
CLIENT_IDENTIFIER=(string) # Client identifier for the Pullflow API server, e.g. "pullflow"
58 changes: 58 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"prettier"
],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE",
"PascalCase"
]
}
],
"@typescript-eslint/semi": "off",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off",
"prettier/prettier": [
"error",
{
"singleQuote": true,
"semi": false
}
],
"no-await-in-loop": "warn",
"no-return-await": "error",
"no-unused-vars": "warn",
"no-nested-ternary": "off",
"no-undefined": "off",
"no-var": "error",
"prefer-const": "warn", //use const when variable isn't reassigned
"prefer-object-spread": "error", // prefer spread operator over object.assign
"require-await": "error", // no async functions without await
//code style consistency
"brace-style": [
"warn",
"1tbs" // one true brace style
]
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
],
"extends": [
"prettier"
]
}
25 changes: 25 additions & 0 deletions .github/workflows/compile-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check Pull Request

on:
pull_request:
branches:
- '*'

jobs:
test:
runs-on: ubuntu-latest
name: Lint, Compile and Test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: yarn
- name: Install packages
run: yarn install
- name: Lint code
run: yarn lint
- name: Compile code
run: yarn compile
- name: Run tests
run: yarn test
23 changes: 23 additions & 0 deletions .github/workflows/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### Summary of changes

- Change 1
- Change 2

### Config impact

- Environment Variables

### Snapshots

Screenshots & video

### Review tips

Start with: `filename`


### PR-specific tests

- Positive tests: User A does X gets X'
- Negative tests: User A attempts X but gets Y
- Boundary tests: User A does X-limit and gets X-limit'
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
out
dist
node_modules
.vscode-test/
*.vsix
.env
.DS_Store
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
}
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "1.0.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
}
]
}
40 changes: 40 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false, // set this to true to hide the "out" folder with the compiled JS files
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"cSpell.words": [
"amodio",
"codereviews",
"dbaeumer",
"nosources",
"Pullflow",
"Relogin",
"thumbsup",
"uuidv",
"vscodeignore",
"Xids"
],
"editor.tabSize": 2,
"files.trimTrailingWhitespace": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
}
40 changes: 40 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$ts-webpack-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": [
"npm: watch",
"npm: watch-tests"
],
"problemMatcher": []
}
]
}
13 changes: 13 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.vscode/**
.vscode-test/**
out/**
node_modules/**
src/**
.gitignore
.yarnrc
webpack.config.js
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--ignore-engines true
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Pullflow

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
## Pullflow for VS Code

Pullflow is a code review collaboration platform backed by the co-founder of GitHub and used by some of the most innovative dev teams, including **Epic Games, Avenue, Hear.com,** and **RedwoodJS.** New to Pullflow? See how you can merge quality PRs **4X** faster with synchronized conversation between developers, systems, and AI, across GitHub, Slack & VS Code.

**[Sign up at pullflow.com](https://pullflow.com)**.

> “Love at first PR. Pullflow's beauty lies in its simplicity, which seamlessly integrates with your existing tools and streamlines the code review process. It lets me focus on writing code instead of navigating clunky interfaces.” - **Bhavin Vyas, Vice President @ WorkBoard**
>
The **Pullflow VS Code extension** brings all your code review workflows and collaboration into your IDE, helping you prioritize PRs, stay in the loop, take quick actions, and return to your flow state.

![main.png](./assets/main.png)

### Quick Start
---

1. **Installation**: Install the “Pullflow” extension from the Visual Studio Marketplace or Open VSX Registry.
2. **Login**: Click on “Sign in to Pullflow” from the VS Code status bar.
3. **Ready to use**: The extension is now ready to use ✨

## Key Features

- Unified interface in VS Code, integrating code review, management, and team communication for improved workflow efficiency.
- Quick Actions to swiftly handle code review todos, allowing for faster task completion with convenient keyboard shortcuts.
- Real-time interaction and synchronized communication between GitHub and Slack.
- Status indicators and quick access links for streamlined comprehension of PR statuses and efficient navigation to GitHub or associated Slack threads.

### **My Active Pull Requests**

**PR Dashboard**: Our extension equips VS Code with a PR Dashboard, offering a consolidated view of your active pull requests. It enables quick identification and focus on pull requests needing attention, all within VS Code Quick Pick.

![pr-dashboard.png](./assets/pr-dashboard.png)

### Quick Actions

The extension comes with a set of actions designed to help you take care of your code review tasks and return to your flow state. Quick actions are accessible with a quick keyboard shortcut, enabling you to:

**Pull Request Workflow Actions**

Take quick actions on pull requests, such as request review, assign, label, and approve, by clicking the status bar or using the keyboard shortcut.

![pr-actions.gif](./assets/pr-actions.gif)


**Instant GitHub/Slack Messages from VS Code**

Engage with your team by responding to comments quickly


![pr-chat.gif](./assets/pr-chat.gif)

**Perfect Companion to GitHub Pull Request and Issues Extension**

Access and review GitHub pull requests directly from your VS Code interface using the [GitHub Pull Requests and Issues](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) extension. With Pullflow, all your code review activity will synchronize across GitHub and Slack.

![pr-github.gif](./assets/pr-github.gif)

### **Iconography**
---

The extension offers a convenient way to quickly understand the status of your Pull Requests (PRs) at a glance. It provides an overview of your pull request life cycles using icon-based indicators.

![vs-code-icon.png](./assets/vs-code-icon.png)

**Compatibility and Requirements**
---

The Pullflow VS Code Extension requires:

1. Pullflow account set up with Slack and GitHub connected
2. Visual Studio Code version 1.70.0 or above

## Data Security and Privacy

We utilize industry-standard encryption protocols to guarantee the confidentiality and security of your data when communicating between the extension and external platforms. You can have confidence that your discussions and interactions are safeguarded.

## Contributing

This extension is an open-source project created by [Pullflow Inc](https://github.com/pullflow/vscode-pullflow). We encourage contributions, bug reports, and new feature suggestions. Feel free to fork the repository and add your own features.

This is just the beginning of Pullflow's VS Code Slack integration, and we are eager to make improvements based on your feedback. Please don't hesitate to share your thoughts with us through [GitHub issues](https://github.com/pullflow/vscode-pullflow/issues) or on Twitter [@pullflow](https://twitter.com/pullflow).

## **License**

[MIT](https://github.com/pullflow/vscode-pullflow/blob/main/LICENSE)

## **Conclusion**

This tool is designed for developers seeking a unified workspace that reduces context-switching and enhances productivity by integrating codebase management, code review, and team communication into a single interface.

---

*For more information, documentation, and updates, visit **[Pullflow's official website](https://pullflow.com/)** or connect with us on **[Twitter](https://twitter.com/pullflow)**.*
Binary file added assets/Pullflow.woff
Binary file not shown.
Binary file added assets/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pr-actions.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pr-chat.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pr-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pr-github.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/pullflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/vs-code-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['<rootDir>/src/**/*.test.ts'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
}
Loading

0 comments on commit 2dfa578

Please sign in to comment.