Skip to content

Commit 8c85c20

Browse files
committed
Allow threshold to be an integer, cleanup setup.py
1 parent 1a68a30 commit 8c85c20

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

gitconsensus/repository.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ def __init__(self, user, repository, client):
8484
"timeout": self.rules.get('timeout')
8585
}
8686

87+
if int(self.rules['pull_requests']['threshold']) > 1:
88+
self.rules['pull_requests']['threshold'] /= 100
89+
8790
# Treat higher version consensus rules are an unconfigured repository.
8891
project_consensus_version = Version(str(self.rules['version']), partial=True)
8992
if max_consensus_version < project_consensus_version:

setup.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,8 @@
22
from setuptools import setup, find_packages
33
# To use a consistent encoding
44
from codecs import open
5-
from os import path
65

7-
here = path.abspath(path.dirname(__file__))
8-
9-
try:
10-
import pypandoc
11-
long_description = pypandoc.convert('README.md', 'rst')
12-
except(IOError, ImportError):
13-
long_description = open('README.md').read()
14-
15-
16-
version = '0.7.5'
6+
version = '0.8.0'
177
setup(
188

199
name = 'gitconsensus',
@@ -22,7 +12,8 @@
2212
packages=find_packages(),
2313

2414
description = 'Automate Github Pull Requests using Reactions',
25-
long_description=long_description,
15+
long_description=open('README.md').read(),
16+
long_description_content_type="text/markdown",
2617
python_requires='>=3',
2718

2819
author = 'Robert Hafner',
@@ -53,7 +44,6 @@
5344

5445
extras_require={
5546
'dev': [
56-
'pypandoc',
5747
'twine',
5848
'wheel'
5949
],

0 commit comments

Comments
 (0)