To contribute, just follow these steps:
- Fork this repo
- Create a new branch (name it according to what functionality you are adding)
- Add, edit, or re-organize Code Snippets by editing folders and files and commiting them to your forked repository
- Submit a pull request to the main branch of
ServiceNowDevProgram / code-snippets
- Pull requests should have a title/comment that describes what is being added/changed
- Pull requests should only contain files that are relevant to what is said in the pull request's title and description
- Files should not be XML imports of ServiceNow records.
That's it! A developer advocate or an sndevs designated approver will review your pull request and if approved, merge it into this repo for everyone's benefit!
Note on multiple submissions: If you plan on doing another pull request and your original pull request hasn't been approved+merged yet, make sure to create a new branch in your forked repo first.
- Top level folders (besides the .github folder) are
CATEGORIES
of snippets. - Within each top level folder/category, will be a sub-folder for
EACH CODE SNIPPET
- Within each sub-folder/code snippet folder, will be one readme.md file to describe the code snippet and then all variants of that code snippet as their own file.
.github
folderfruits
folderapples
folderreadme.md
file describing the apples code snippetapples.js
first file with code snippetfijiapples.js
a second file that has a slight variation that distinguishes a separate use-case
kiwi
folderreadme.md
file describing the kiwi code snippetkiwi.js
file with code snippet
vegetables
foldercarrots
folderreadme.md
file describing the vegetables code snippetcarrots.js
first file with code snippet
potatos
folderreadme.md
file describing the potatos code snippetpotatos.js
file with original code snippetyukongoldpotato.js
file that is similar to potato.js but is for yukon gold potatos specificallytatertots.js
file that is similar to potato.js but is for when you need the result to be tater tots
Before you submit your pull request, all code snippet files should:
- Be in a matching folder
- That folder should be in a category folder
- Your code snippet should be accompanied by a readme.md file to describe it