Skip to content
Merged
Show file tree
Hide file tree
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
32 changes: 32 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[flake8]
ignore =
E121,
E126,
E127,
E128,
E203,
E225,
E226,
E231,
E241,
E251,
E261,
E265,
E302,
E303,
E305,
E402,
E501,
E741,
W291,
W292,
W293,
W391,
W503,
W504,
F403,
B007,
B950,
W191,

max-line-length = 200
24 changes: 24 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pull_request_rules:
- name: Automatic merge on CI success and review
conditions:
- status-success=Sider
- status-success=Semantic Pull Request
- status-success=Codacy Static Code Analysis
- status-success=security/snyk (Bloomstack)
- label!=Don't Merge
- label!=squash
- "#approved-reviews-by>=1"
actions:
merge:
method: merge
- name: Automatic squash on CI success and review
conditions:
- status-success=Sider
- status-success=Codacy Static Code Analysis
- status-success=security/snyk (Bloomstack)
- label!=Don't Merge
- label=squash
- "#approved-reviews-by>=1"
actions:
merge:
method: squash
2 changes: 1 addition & 1 deletion bloomstack_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

__version__ = '2.0.13'
__version__ = '2.1.0'
14 changes: 13 additions & 1 deletion bloomstack_core/hook_events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from frappe.core.utils import find
from frappe.desk.form.linked_with import get_linked_docs, get_linked_doctypes
from frappe.utils import date_diff, get_time, getdate, nowdate, to_timedelta, today
from frappe.utils.user import get_users_with_role


def validate_default_license(doc, method):
Expand Down Expand Up @@ -85,3 +84,16 @@ def validate_delivery_window(doc, method):
))

frappe.sendmail(recipients=recipients, subject=subject, message=message)

def get_users_with_role(role):
# returns users with the specified role
user_list = frappe.get_all("User", fields=["`tabUser`.name"],
filters = [
["Has Role", "role", "=", role],
["User", "name", "not in", ["Guest", "Administrator"]],
["User", "enabled", "=", 1]
],
as_list=1
)

return [user for users in user_list for user in users]
Binary file modified bloomstack_core/public/images/favicon.ico
100755 → 100644
Binary file not shown.
Empty file modified bloomstack_core/public/images/icon.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions sider.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# This is a configuration file to customize code analysis by Sider.
#
# For more information, see the documentation:
# https://help.sider.review/getting-started/custom-configuration

# Customize each tool. If analyses fail, try adjusting each option referencing the following example.
linter:
flake8:
config: .flake8

# # ESLint example. See https://help.sider.review/tools/javascript/eslint
# eslint:
# root_dir: project/
# dependencies:
# - my-eslint-plugin@2
# npm_install: false
# target:
# - src/
# - lib/
# ext: [.js, .jsx]
# config: config/.eslintrc.js
# ignore-path: config/.eslintignore
# ignore-pattern: "vendor/**"
# no-ignore: true
# global: ["require", "exports:true"]
# quiet: true

# # Flake8 example. See https://help.sider.review/tools/python/flake8
# flake8:
# root_dir: project/
# dependencies:
# - flake8-bugbear
# - flake8-builtins==1.4.1
# - git+https://github.com/PyCQA/flake8-import-order.git@51e16f33065512afa1a85a20b2c2d3be768f78ea
# - { name: "flake8-docstrings", version: "==1.6.0" }
# target: src/
# config: config/.flake8
# parallel: false

# # Misspell example. See https://help.sider.review/tools/others/misspell
# misspell:
# root_dir: project/
# target: [src/, test/]
# exclude: ["**/*.min.*"]
# locale: UK
# ignore: [center, behavior]

# # remark-lint example. See https://help.sider.review/tools/markdown/remark-lint
# remark_lint:
# root_dir: project/
# dependencies:
# - my-remark-plugin@2
# npm_install: false
# target: [docs/]
# ext: "md,markdown"
# rc-path: config/.remarkrc
# ignore-path: config/.remarkignore
# use:
# - remark-lint-file-extension
# - remark-lint-no-heading-punctuation

# # ShellCheck example. See https://help.sider.review/tools/shellscript/shellcheck
# shellcheck:
# root_dir: project/
# target:
# - "**/*.{sh,bash}"
# - shebang: true
# include: [SC2104, SC2105]
# exclude: [SC1000, SC1118]
# enable: all
# shell: bash
# severity: error
# norc: true

# # stylelint example. See https://help.sider.review/tools/css/stylelint
# stylelint:
# root_dir: project/
# dependencies:
# - my-stylelint-plugin@2
# npm_install: false
# config: config/.stylelintrc.yml
# syntax: scss
# ignore-path: config/.stylelintignore
# ignore-disables: true
# report-needless-disables: true
# quiet: true
# target: ["app/**/*.scss"]

# Ignore specific files. Example:
# ignore:
# - "*.pdf"
# - "*.mp4"
# - "*.min.*"
# - "images/**"

# Exclude specific branches. Example:
# branches:
# exclude:
# - master
# - development
# - /^release-.*$/