ServiceNowDevProgram / SlackerBot

The official application repository for the bot @Slacker on the sndevs.com workspace.
https://github.com/ServiceNowDevProgram/Hacktoberfest
9 stars 73 forks source link
hacktoberfest hacktoberfest-accepted hacktoberfest2022 hacktoberfest2023 servicenow slack

SlackerBot Banner

This bot is what controls the @Slacker bot on the sndevs.com workspace.

πŸ””πŸ””πŸ””
CONTRIBUTORS must follow all guidelines in CONTRIBUTING.md or run the risk of having your Pull Requests labeled as spam.
πŸ””πŸ””πŸ””

Contents

Ideas

See the Issues tab for parser ideas. Make sure to leave a comment on an issue if you're working on it.

Two ways to contribute

Easy or Hard

Easy method (Adding new parser)

Can be done without pulling this app into a ServiceNow instance.
This is the preferred method for adding simple call & response parsers (see Bowtie when chuck is mentioned, or Clap Back for examples)

  1. Fork this repo
  2. Create a new branch (name it according to what functionality you are adding)
  3. Create a new .js file in the Parsers folder (see CONTRIBUTING.md for requirements)
  4. Submit a pull request to the ServiceNowDevProgram/SlackerBot main branch

If approved, your new parser automatically goes live for the bot's immediate use!


Hard method (Adding new functionality types)

This method requires more setup, but is the preferred method for more complex parsers and functionalities, as it provides a method to robustly test before submitting a pull request.

  1. Fork this repo
  2. Go to your ServiceNow instance
  3. Go to System Applications => Studio
  4. Once Studio loads, select Import From Source Control
  5. Use your forked repo to Import your application
  6. Optional: See below on how to get this bot working on your own slack server
  7. Make updates to the application (see CONTRIBUTING.md for additional details)
  8. In Studio, commit your changes to source control
  9. Submit a pull request to the ServiceNowDevProgram/SlackerBot main branch

An accepted Pull Request and merge does not necessarily mean the functionality will go live immediately, as an admin for the host instance will need to pull the application into ServiceNow.

Installing this bot on your own workspace

Create App and Install it

Via a Manifest

Manually

Connect them together

Testing

Troubleshooting

GitHub to ServiceNow Integrations

Auto populate your Parsers table

To fill your Parsers x_snc_slackerbot_parser table with all the parsers that exist on this repo:

This syncs your table to this repo, if you rather sync it to another repo, change the value of your x_snc_slackerbot.Parsers_Sync_Repo system property.

Setting up the GitHub to ServiceNow integration

The Parsers folder on ServiceNowDevProgram/SlackerBot is set up to send changes to the ServiceNow instance that @Slacker is hosted on (automatically, on every commit). To do this for your own fork and ServiceNow instance:

Testing

Notes for setting this app up in ServiceNow Studio

Never commit your tokens to GitHub

System Properties

Scripted Rest APIs (SRAPIs)

Available APIs/variables in parsers