rhevm-qe-automation / pytest_jira

py.test plugin to integrate with JIRA
GNU General Public License v2.0
29 stars 25 forks source link

Enable plugin usage via --jira-enabled=true #93

Open liiight opened 6 years ago

liiight commented 6 years ago

I'd like to have the option wether to use the plugin or not pass as an envvar in my CI. Currently this is possible either via manipulating the command arts via a bash script or using the PYTEST_ADDOPTS envvar. Both of these aren't nice.

I propose adding a --jira-enabled=true option, that will accompany the other existing flags as to not break compatibility.

If you like this I can put out a PR for this change.

WDYT?

lukas-bednar commented 6 years ago

I am worried about --jira flag, the presence or absence of this flag says whether to enable or disable this plugin. This --jira-enable flags seems to be duplicate to me ... or I am overlooking something ?

liiight commented 6 years ago

hmm, using pytest's PYTEST_ADDOPTS seems nicer than I though:

$ PYTEST_ADDOPTS="--jira"
$ pytest

I was thinking using an explicit flag would be nicer though:

$ JIRA_ENABLED="true"
$ pytest --jira-enabled=$JIRA_ENABLED

But I guess it's a minor/not an issue...