Skip to content

Commit ad003a6

Browse files
authored
docs: improve README for better usability and discoverability (#1671) (#1806)
1 parent 86a53fb commit ad003a6

File tree

1 file changed

+70
-2
lines changed

1 file changed

+70
-2
lines changed

README.md

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
![Code Snippets Banner](https://github.com/ServiceNowDevProgram/code-snippets/assets/31702109/f9fa072a-4c0c-426b-8eed-200c6616ff60)
22

3+
# ServiceNow Code Snippets Repository
4+
35
Welcome to ServiceNow's Code Snippets community repository, managed by the Developer Program and the sndevs Slack community.
46

57
Inside this repository, you will find community submitted code-snippets and their variants for different use-cases.
68

9+
**[📝 Contribution Guidelines](CONTRIBUTING.md)** | **[📚 Browse Categories](#repository-organization)** | **[🔍 How to Use](#how-to-use-this-repository)**
10+
711
> Interested in our other ServiceNow Hacktoberfest projects? See the main repository [here](https://github.com/ServiceNowDevProgram/Hacktoberfest) or see our official blog post [here](https://devlink.sn/hacktoberfest).
812
913
**Note:** ServiceNowDevProgram has many repositories that can be imported directly into ServiceNow, this is not one of them; This repository is meant to be edited directly in GitHub or any other Git-enabled IDE like VS Code.
@@ -28,6 +32,25 @@ We appreciate your participation and contributions to this community-driven proj
2832
**_CONTRIBUTORS must follow all guidelines in [CONTRIBUTING.md](CONTRIBUTING.md)_** or run the risk of having your Pull Requests labeled as spam.<br>
2933
🔔🔔🔔
3034

35+
## Table of Contents
36+
37+
- [How to Use This Repository](#how-to-use-this-repository)
38+
- [Repository Organization](#repository-organization)
39+
- [Finding Snippets](#finding-snippets)
40+
- [Folder Structure](#folder-structure)
41+
- [Contributing](#we-invite-you-to-contribute)
42+
- [Disclaimer](#disclaimer)
43+
44+
## How to Use This Repository
45+
46+
This repository contains code snippets that you can use in your ServiceNow instance. Here's how to make the most of it:
47+
48+
1. **Browse by Category**: Navigate through the [six major categories](#repository-organization) to find snippets relevant to your needs.
49+
2. **Copy and Adapt**: Once you find a useful snippet, copy the code and adapt it to your specific use case in your ServiceNow instance.
50+
3. **Read the Documentation**: Each snippet folder contains a README.md file that explains how the snippet works and how to implement it.
51+
4. **Search by Topic**: Use GitHub's search functionality to find snippets by keywords (e.g., "GlideRecord", "REST", "UI Action").
52+
5. **Contribute Your Own**: If you have a useful snippet, consider [contributing](#we-invite-you-to-contribute) to help others.
53+
3154
## Repository Organization
3255

3356
The repository is organized into **6 major categories** that cover all aspects of ServiceNow development:
@@ -50,16 +73,61 @@ External system integrations, data import/export utilities, RESTMessageV2 exampl
5073
### 🎯 [Specialized Areas](Specialized%20Areas/)
5174
Domain-specific functionality including CMDB utilities, ITOM scripts, Performance Analytics, ATF Steps, Agile Development tools, and other specialized use cases.
5275

76+
## Finding Snippets
77+
78+
There are several ways to find the snippets you need:
79+
80+
1. **By Category**: Browse the six major categories listed above.
81+
2. **By Search**: Use GitHub's search functionality with keywords like:
82+
- API names: `GlideRecord`, `GlideSystem`, `GlideAjax`
83+
- Component types: `Business Rule`, `Client Script`, `UI Action`
84+
- Functionality: `REST`, `SOAP`, `Import`, `Export`
85+
- Use cases: `Authentication`, `Notification`, `Workflow`
86+
87+
3. **By Tags**: Many snippets include common keywords in their README files that can be searched.
88+
89+
## Folder Structure
90+
91+
The repository follows a consistent structure to make navigation easier:
92+
93+
```
94+
Top-Level Category/
95+
├── Sub-Category/
96+
│ ├── Specific Snippet/
97+
│ │ ├── README.md # Description and usage instructions
98+
│ │ ├── snippet_file.js # The actual code snippet
99+
│ │ └── variant.js # Variations of the snippet (if applicable)
100+
```
101+
102+
For example:
103+
```
104+
Core ServiceNow APIs/
105+
├── GlideRecord/
106+
│ ├── Query Performance Optimization/
107+
│ │ ├── README.md
108+
│ │ ├── basic_query.js
109+
│ │ └── optimized_query.js
110+
```
111+
53112
## We invite you to contribute!
54113

114+
We welcome contributions from the ServiceNow developer community! Your knowledge and experience can help others solve common challenges.
115+
55116
To contribute, just follow these steps:
56117

57118
1. Fork this repo (you get a point just by forking!)
58119
2. Create a new branch on your fork
59-
3. Add/Update the repo
120+
3. Add/Update the repo following our [folder structure guidelines](#folder-structure)
60121
4. Submit a pull request!
61122

62-
That's it! More detailed contribution instructions can be found [here](CONTRIBUTING.md)
123+
That's it! **For detailed contribution instructions, please read our [CONTRIBUTING.md](CONTRIBUTING.md) guide before submitting.**
124+
125+
### What makes a good contribution?
126+
127+
- **Useful snippets** that solve common ServiceNow development challenges
128+
- **Well-documented code** with clear comments explaining how it works
129+
- **Proper organization** following the repository structure
130+
- **Variations** of snippets for different use cases when applicable
63131

64132
## Leaderboard
65133

0 commit comments

Comments
 (0)