term-check

module
v0.0.0-...-70c028e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: Apache-2.0

README ¶

Term Check GoDoc GolangCI

This bot is for our Inclusive Language initiative inside Zendesk Engineering.

Screen Shot 2020-08-19 at 11 00 23 AM

Configuration

Bot Configuration

Configuration for the bot's behavior is contained in config.yaml, e.x.

# Any shared configuration between fields
shared:
  # ID of the GitHub application
  appID: &appID 123456
botConfig:
  appID: *appID
  # List of terms to look for and flag in code
  termList:
    - slave
  # Name of the check. Will appear in the status list and as the title on the 'details' page
  checkName: Inclusive Language Check
  # Check summary to set when no terms are found
  checkSuccessSummary: Looks good! 😇
  # Check summary to set when terms are found
  checkFailureSummary: 👋 exclusive language
  # Generic check details text
  checkDetails: "Language check results:"
  # Text for the title of check annotations created for each flagged term in the code
  annotationTitle: Exclusive Language
  # Text for the body of each annotation. Supports one format string [%s] which will be replaced by the flagged terms
  # found on that line
  annotationBody: |
    Hi there! 👋 I see you used the term(s) [%s] here. This language is exclusionary for members of our community,
    please consider changing it.
clientConfig:
  appID: *appID
  # Path to the private key generated for the GitHub application
  privateKeyPath: /secrets/PRIVATE_KEY
Repo-Specific Configuration

Certain behaviors are configurable on a per repository basis. Add a .github/term-check.yaml file to your repository based off of the following template:

# An array of patterns following .gitignore rules (http://git-scm.com/docs/gitignore) specifying which files and
# directories should be ignored by the app
ignore:
  - foo
  - bar/

Deploying Your Own Instance

See docs/deploy.md for instructions to deploy your own term-check instance.

Copyright 2019 Zendesk, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories ¶

Path Synopsis
cmd
term-check
Package main provides the entry point for the GitHub application
Package main provides the entry point for the GitHub application
internal
bot
Package bot contains all of the main logic for handling GitHub events, including creating CheckRuns for each Pull Request
Package bot contains all of the main logic for handling GitHub events, including creating CheckRuns for each Pull Request
config
Package config provides objects containing configuration for specific parts of the application.
Package config provides objects containing configuration for specific parts of the application.
pkg
config
Package config provides some basic helpers to read environment variables, as well as secrets that are set by Samson.
Package config provides some basic helpers to read environment variables, as well as secrets that are set by Samson.
github
Package github provides both a server and a client that can be used to interact with the GitHub API
Package github provides both a server and a client that can be used to interact with the GitHub API
lib
Package lib contains generic helper functions for massaging and handling data
Package lib contains generic helper functions for massaging and handling data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL