Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CONTRIBUTING.md #55

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,46 @@
- Changes that are not within the scope of the description will result in the entire PR being rejected
- No updates should be made directly to the automatically generated ServiceNow folders. Updates to these files should be done via the [Regular method](README.md#manually) described on the readme.
- Low effort/spam Pull Requests will be marked as spam accordingly.
- Filenames should not have special characters that are not allowed on normal file systems (eg. do not put ! in the file name).
- Filenames should not have special characters that are not allowed on normal file systems (eg. do not put ! in the file name).


## Messages

To contribute new messages for when points are awarded or milestones are reached:
1. Fork this repo and import it into your instance
2. In your instance navigate to `Points Thing > Messages`
3. Add an entry
4. In Studio, commit your changes to source control
5. Submit a pull request to the ServiceNowDevProgram/Points-Thing main branch

### To create a new message

There are three fields to fill in, Message, Point Trigger, and Send to milestone channel.

#### Message

In the Message field create the string that is the message you want to be sent followed by a semicolon.
There are placeholders available for system generated values:

- `user`: the @user name that recieved the points
- `points`: the new number of points that the user has (90 day running total)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be using grave accents and not quotes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, That is a typo. Will submit a new PR.

- 'total`: the actual all time total number of points the user has

An example of a good message would be:
`'Congrats ' + user + ' you now have ' + points + ' points';`

Note: Any message that is NOT sent to the milestone channel will have `'(' + total + ' total)'` automatically appended to it.

You can also use emojis in your message by including them with the standard :emojiName: notation that slack uses.


#### Point Trigger

This is an optional field. If filled in, the message will only trigger at this number of lifetime total points.
If blank it will trigger for any number of points that does not have a specific trigger (i.e. if there is a special message for 100 points, that message will trigger and not the blank one).
If there are multiple messages that have the same trigger value (including blank) the message that will trigger will be randomly chosen.

#### Send to milestone channel

If this is selected than the message will be sent to the defined Milestone channel in addition to the standard reply. This will also suppress the `'(' + total + ' total)'` that gets appended to most messages.

Loading