GithubHelp home page GithubHelp logo

apidocs's Introduction

Build Status

#CenturyLink Cloud API Documentation

Welcome to the CenturyLink Cloud API Documentation repository. Please follow the guidelines below to contribute or make changes.

If you are new to Git and Github, we highly recommend spending 5 minutes reading this great article on Understanding the Github Flow. This repo follows the Github Flow.

How To Make Contributions

  1. Fork the https://github.com/CenturyLinkCloud/APIDocs repository. This will produce a personal copy of this repo.

  2. Clone the repo to your desktop.

  3. Anything in the master branch is always deployable. Create a new branch from master. Your branch name should be descriptive (e.g., server-power-operations) so that others have an idea of what the branch is for.

  4. The master branch represents version 2 of the api, while the v-1 branch is version 1.

  5. Once your branch has been created, make your changes (add, edit, delete) your knowledge base article in your favorite Markdown editor (we like Atom).

  6. Commit your change(s) locally to your fork/branch.

  7. Push or sync your commit(s) to the remote repository on Github.

  8. Create a pull request to merge your changes into the master branch.

  1. This repository contains a commit analyzer that runs against each file in the repository validating that the following are true:
  • File's JSON front-matter parses correctly and contains the required fields (title, date, autor)
  • File's markdown successfully parses
  • All links and images are valid (doesn't return 404)

Issuing a pull-request will automatically trigger the commit analyzer to validate any changes to the repository as part of continuous integration with travis-ci. If you try to commit changes in which there are syntax errors or broken links, the build log from travis-ci will display which files contain errors, and you will receive an email notification that the build failed.

A pull-request containing errors will look like this: commit analyzer failure

Any error(s) will be displayed in the Travis-CI build log. The build log is accessible at https://travis-ci.org/CenturyLinkCloud/PublicKB or by clicking on the "Details" link on the pull request page on Github. Here's an example of a broken link: build log error

Pushing/syncing additional commits to your fork/branch will trigger the analyzer to re-check your changes.

A pull-request without errors will also look like this: commit analyzer failure

Content authors are responsible for making their pull requests pass the commit analyzer. Once they pass, pull requests will be merged.

  1. CenturyLink Cloud Team reviews your pull request. If accepted, it will be added to the API Documentation on CenturyLinkCloud.com.

Run the Commit Analyzer locally

If your APIDocs/lib directory is empty, ensure that GitHub ssh is setup correctly, cd to the project root, and run:

git submodule update --init --recursive

To run this check locally, cd into the root of this project and run:

node lib/index.js

Note that the first time you wish to run the commit analyzer, you'll have to run npm install from the lib directory. This assumes you have Node.js installed.

Note: ensure you do not commit any changes to, or auto-prune the APIDocs/lib directory.

Links (API doc to API doc)

Links to other articles should follow this format:

[Link Text](../category/api-doc-name.md)

so like this (folder names are case-sensitive):

[API v2.0 Overview](../Getting Started/api-v2-overview.md)
[Login](../Authentication/login.md )

Commit Analyzer

This repository contains a commit analyzer that runs against each file in the repository validating that the following are true:

  • File's JSON front-matter parses correctly and contains the required fields (title, date, autor)
  • File's markdown successfully parses
  • All relative files (images and other markdown files) are valid links

To run this check locally, cd into the root of this project and run:

node lib/index.js

Note that the first time you wish to run the commit analyzer, you'll have to run npm install from the lib directory. This assumes you have Node.js installed.

The output will tell you if any file fails parsing. This script is also run as part of continuous integration with travis-ci.

TODO: REVERT THIS

Ignoring Files

If a file contains a link that the commit analyzer catches as being invalid (such as in a code sample), and you'd like the analyzer to ignore that file, you can add the filename to commit_analyzer_ignore.txt. (It isn't necessary to include the entire file path; just the filename will suffice.) Each new file should be separated by a new line.

apidocs's People

Contributors

srveit avatar nathanyoung avatar anthonyhakim avatar jgerger avatar bryanfriedman avatar lyzalou avatar ryanbrockman avatar thenickcox avatar jim-phillips avatar justinwithington avatar jontaitctl avatar marcind avatar osbornm avatar rpdubose avatar richardcase avatar csterwa avatar dmak78 avatar mikebeyer avatar brannon avatar apnewton avatar bradwilson avatar damieng avatar pascualin avatar idrabenia avatar mosoto avatar mattskone avatar scottdensmore avatar anilpalepu avatar gsctl avatar kyle-miller-centurylink avatar

Watchers

James Cloos avatar Jacky Boen 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.