GithubHelp home page GithubHelp logo

nschonni / vscode-docs-build Goto Github PK

View Code? Open in Web Editor NEW

This project forked from docascode/vscode-docs-build

0.0 2.0 0.0 34.48 MB

VS Code extension to provide local build and validation experience for Docs repository.

License: MIT License

TypeScript 99.55% JavaScript 0.45%

vscode-docs-build's Introduction

Docs Validation

Build Status

This extension enables you to run build validation on a Docs conceptual or Learn repo at author time in VS Code. This means you can make sure your repo is free of validation issues before making a pull request.

Prerequisites

  • Install git.
  • Clone your Docs or Learn repo locally in VS Code.
  • All files in the repo must be saved.

How to use the Docs Validation extension

  1. Open a Docs conceptual or Learn repo in VS Code with the extension installed.
  2. If you're a Microsoft employee, optionally sign in in by clicking Docs Validation from the VS Code status bar. You can still use the extension without signing in, but sign in is recommended to use the most recent build information for private repos.
  3. Trigger a build by clicking Yes when prompted after sign in, by clicking Docs Validation on the status bar then clicking Validate from the drop-down menu, or by right-clicking any file in the repo and selecting Validate this repository.
  4. Build validation will run locally and all results will be output to the Problems pane.

OAuth

Note: The first time you validate a repo, all the Docs build dependencies will be fetched and cached locally. Subsequent validation runs will be faster.

Known issues

The following validations have inconsistent results between Docs Build validation and local validation.

  • bookmark-not-found: The rendering information required to validate bookmarks in schema-based content isn't available publicly, so if you aren't signed in as a Microsoft employee you might not get all broken bookmark results.
  • author-not-found and ms-author-invalid: These validations require external API calls that aren't supported locally at this time, so no results will be returned for them.

Troubleshooting

You might encounter the following issues when using the extension.

Clone template repository or dependencies failed

When your validation fails with some error message like:

fatal: unable to access 'https://github.com/Microsoft/templates.docs.msft/': The requested URL returned error: 403
git-clone-failed Failure to clone the repository `https://github.com/Microsoft/templates.docs.msft#master`. This could be caused by an incorrect repository URL, please verify the URL on the Docs Portal (https://ops.microsoft.com). This could also be caused by not having the proper permission the repository, please confirm that the GitHub group/team that triggered the build has access to the repository.
Restore done in 11.77s

  1 Error(s), 0 Warning(s), 0 Suggestion(s)
Error: running 'docfx restore' failed with exit code: 1

Please try the following solutions:

  1. Make sure you can access this repository https://github.com/Microsoft/templates.docs.msft on GitHub, if not, please join the Microsoft org by the this website, after that, try again.

  2. Try to clone the template repository in a separated terminal by running the following command:

    $ git clone https://github.com/Microsoft/templates.docs.msft
  3. If you have enabled 2FA on GitHub and you run into the following errors when you clone the repository, please follow these instructions.

    Cloning into 'templates.docs.msft'...
    Username for 'https://github.com': 928PJY
    Password tor 'https: //[email protected]':
    remote: Invalid username or password.
    fatal: Authentication failed for https://github. com/Microsoft/templates.docs.msft/'
  4. GitHub has recently enabled SSO on Microsoft-owned organizations. If you see the below errors, please follow the instructions there to enable SSO on your token so that local validation can pass through.

    fatal: unable to access 'https://github.com/Microsoft/templates.docs.msft/': The requested URL returned error: 403
    remote: The `microsoft' organization has enabled or enforced SAML SSO. To access
    remote: this repository, visit https://github.com/enterprises/microsoftopensource/sso?authorization_request=AEJANEWOPPW6YTNW5TYNW2K7OBDR3A5PN5ZGOYLONF5GC5DJN5XF62LEZYAF32PCVVRXEZLEMVXHI2LBNRPWSZGODVDHWBVPMNZGKZDFNZ2GSYLML52HS4DFVNHWC5LUNBAWGY3FONZQ

License

MIT

Issue

File a issue

How to Contribute

Contribution guideline

All contributions are welcome!

vscode-docs-build's People

Contributors

928pjy avatar cillroy avatar dependabot[bot] avatar herohua avatar live1206 avatar meganbradley avatar mingwli avatar nschonni avatar shanluo911 avatar yufeih avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.