Skip to content

Latest commit

 

History

History
156 lines (103 loc) · 5.8 KB

CONTRIBUTING.md

File metadata and controls

156 lines (103 loc) · 5.8 KB

Contributing

Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.

We accept pull requests for bug fixes and features where we've discussed the approach in an issue and given the go-ahead for a community member to work on it. We'd also love to hear about ideas for new features as issues.

We track issues on our project board here.

Please do:

  • Check existing issues to verify that the bug or feature request has not already been submitted.
  • Open an issue if things aren't working as expected.
  • Open an issue to propose a significant change.
  • Open a pull request to fix a bug.
  • Open a pull request to fix documentation about a command.
  • Open a pull request for any issue labelled help wanted or good first issue.

Please avoid:

  • Opening pull requests for issues marked needs-design, needs-investigation, or blocked.

Contributions to this project are released to the public under the project's open source license.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Prerequisites for running and testing code

These are one time installations required to be able to test your changes locally as part of the pull request (PR) submission process.

  1. Install Node.js for your platform
  2. Install VS Code for your platform
  3. Install the dependencies. From the repository root run:
npm i

Dev loop & Testing changes

The extension is written in TypeScript and built using webpack. The dev loop steps and commands have been tested on both Mac and Windows.

  1. Go to the Debug tab.
    1. Hit Watch all & Launch Extension (workspace) if you want to work on the main VS Code extension like the left sidebar and the UI for the extension.
    2. Hit Watch & Launch Extension + language-server (workspace) if you want to work on the language services code and want to debug and work on the hover, syntax highlighting, and other functionality within the Workflow files.
      • This will attach to an instance of the language server running on port 6010
  2. Hit the play button (this will automatically run npm watch for you and monitor for changes) which will open a local version of the extension using the extension development host.
  3. Make changes.
  4. To get new changes, hit the refresh button in the debugger window to reload the extension in the development host. If you don't see the changes, wait long enough for the npm watch terminal to rebuild and then try hitting the play button again. image

npm commands

For the commands below make sure that you are in the vscode-github-actions directory of your local repo first.

cd vscode-github-actions

Build

Build changes (one time):

npm run build

Or to watch for changes and automatically rebuild every time on save:

npm run watch

Running tests

npm test

Or to watch for changes and run tests:

npm run test-watch

Lint

npm run lint

Run linter and fix errors as possible:

npm run lint-fix

Format

Check formatting with prettier:

npm run format-check

Run prettier and automatically format:

npm run format

Package the extension

npm run package

Run Web Extension

"Run Web Extension in VS Code" - run the web version of the extension

VS Code Source Control Repositories

If you don't see vscode-github-actions and languageservices, please go to Preferences: Open User Settings and then search for git.openRepositoryInParentFolders and you can set it to always and it will show all of the associated repos for the Workspace.

image

Submitting a pull request

  1. Fork and clone the repository
  2. Configure and install the dependencies (in the repository root folder): npm i
  3. Create a new branch: git checkout -b my-branch-name
  4. Make your change, add tests, and make sure the tests and linter still pass
  5. Push to your fork and submit a pull request

Here are a few things you can do that will increase the likelihood of your pull request being accepted:

  • Format your code with prettier.
  • Write tests.
  • Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
  • Write a good commit message.

Resources