Skip to content

Commit

Permalink
Readme and pre commit config (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-dot-one authored Feb 18, 2023
1 parent 0df26bc commit b6150e9
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Thank your for caring and for creating an issue. Please do not submit security issues here, but do follow the
[Security Policy](../SECURITY.md).

## Checklist
- [ ] Is this something you can **debug and fix**? Submit a pull request! Bug fixes and documentation fixes are welcome.
- [ ] Is this a security issue? Review our [Security Policy](../SECURITY.md).
- [ ] Have an idea for a feature? Post the feature request as an Issue (right here).

## Create a Bug Report

Make sure to add **all the information needed to understand the bug** so that someone can help. If the info is
missing we'll add the 'Needs more information' label and close the issue until there is enough information to
understand and triage the bug.

- [ ] Provide a **minimal code snippet**
- [ ] Provide **screenshots** where appropriate
- [ ] Are you using Linux, Mac, or Windows?

## Description

## Code Snippets

## Screenshots
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- You can erase any parts of this template not applicable to your Pull Request. --->

## Description
<!--- Explain the details for making this change. What existing problem does the pull request solve? --->

## Related Issue
<!--- If suggesting a new feature or change, please discuss it in an issue first --->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce --->
<!--- Put `closes #XX` in your comment to auto-close the issue that your PR fixes --->
<!--- Link to the issue here: --->
[//]: # (* [ ] Have you followed the guidelines in our Contributing document?)
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/d-dot-one/publish-to-aws-sns-action/pulls) for the same update/change?

## Pull Request Checklist:

* [ ] Did you write tests for your changes?
* [ ] Does your submission pass all tests?
* [ ] Did you run `pre-commit` before submission?
* [ ] Did you override or ignore any linting issues?
* [ ] Do your changes pass all workflow steps?
* [ ] Did you update the documentation?
Empty file removed .github/pull_request_template.md
Empty file.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,3 @@ dmypy.json
tests/badges/
tests/sns-event.json
.pytest_cache
.pre-commit-config.yaml
123 changes: 123 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
default_stages: [commit]
fail_fast: false
minimum_pre_commit_version: 2.15.0

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
args:
- --maxkb=1500
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
exclude: manual-artifacts/tailscale/
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-yaml
exclude: deployments/(.*)/helm-charts/
- id: debug-statements
- id: destroyed-symlinks
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- id: detect-private-key
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: name-tests-test
args:
- --django
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.4.2
hooks:
- id: isort

# - repo: https://github.com/PyCQA/pylint
# rev: v2.13.4
# hooks:
# - id: pylint
# name: pylint
# entry: pylint
# exclude: ^tests
# language: system
# types: [file, python]
# require_serial: true
# args:
# # general config
# - --ignore=CVS
# - --ignore=tests
# - --persistent=no
# - --load-plugins=pylint_quotes
# - --extension-pkg-whitelist=lxml
# # disables
# - --disable=broad-except
# - --disable=broad-exception-raised
# - --disable=consider-iterating-dictionary
# - --disable=logging-fstring-interpolation
# - --disable=logging-format-interpolation
# - --disable=missing-module-docstring
# - --disable=too-few-public-methods
# - --disable=unused-variable
# - --disable=invalid-name
# # reports
# - --output-format=text
# - --reports=no
# - --evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# # variables
# - --init-import=yes
# - --dummy-variables-rgx=dummy|unused
# - --additional-builtins=_
# # classes
# - --defining-attr-methods=__init__,__new__,setUp
# - --valid-classmethod-first-arg=cls
# # naming
# - --module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# - --const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# - --class-rgx=[A-Z_][a-zA-Z0-9]+$
# - --function-rgx=[a-z_][a-zA-Z0-9_]{2,45}$
# - --method-rgx=[a-zA-Z_][a-zA-Z0-9_]{2,50}$
# - --attr-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
# - --argument-rgx=[a-z_][a-zA-Z0-9_]{2,30}
# - --variable-rgx=[a-z_][a-zA-Z0-9_]{2,30}$|[a-z]
# - --inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
# - --good-names=i,j,_,x,y,z,N,E,S,W,id,logger
# - --bad-names=foo,bar,baz,toto,tutu,tata,zzyzx
# - --no-docstring-rgx=__.*__
# # notes
# - --notes=FIXME,fixme,TODO,todo,FIX,fix,\\todo,@todo
# # typecheck
# - --ignore-mixin-members=yes
# # formatting
# - --max-line-length=120
# - --max-module-lines=1200
# - --indent-string=' '
# - --string-quote=single
# - --triple-quote=single
# - --docstring-quote=double
# # similarities
# - --min-similarity-lines=7
# - --ignore-comments=yes
# - --ignore-docstrings=yes
# # design
# - --max-args=10
# - --ignored-argument-names=_.*|event
# - --max-locals=20
# - --max-returns=6
# - --max-branches=20
# - --max-statements=50
# - --max-parents=7
# - --max-attributes=15
# - --min-public-methods=2
# - --max-public-methods=30
# # imports
# - --known-standard-library=yes
# - --known-third-party=yes
# - --analyse-fallback-blocks=yes
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Publish to AWS SNS Topic - GitHub Action
This is a GitHub Action that will publish a JSON message to an AWS SNS Topic. By default this action will return the
This is a GitHub Action that will publish a JSON message to an AWS SNS Topic. By default, this action will return the
entire GitHub context as the `MESSAGE` for the AWS SNS topic. To send more specific data, update the `MESSAGE`
environment variable that is passed in your `.github/workflows.publish-to-sns.yaml`.

Expand Down Expand Up @@ -48,8 +48,8 @@ This action publishes a message in the following format to AWS SNS:

```json
{
'message': [JSON-formatted message],
'commit_id': [GitHub Commit ID],
"message": "<JSON-formatted message>",
"commit_id": "<GitHub Commit ID>"
}
```

Expand Down

0 comments on commit b6150e9

Please sign in to comment.