70 Commits

Author SHA1 Message Date
Dirk Müller
730630f06f
Use f-strings where possible 2024-05-07 21:52:32 +02:00
33cd1998aa
Fallback import Literal & TypedDict from typing_extension 2023-07-14 15:11:35 +02:00
1703348adb
Remove unused variable 2023-06-29 11:27:25 +02:00
05711eeccd
Convert namedtuples into a typed NamedTuples 2023-06-29 11:27:24 +02:00
e842fd26b1
Add some type hints 2023-06-29 11:27:23 +02:00
Stephan Kulow
aaab4af930 Target F401 - Unused imports 2022-02-18 18:29:27 +01:00
Stephan Kulow
d8f5d0874e Remove E201 - Whitespace after '('
https://www.flake8rules.com/rules/E201.html
2022-02-18 17:23:19 +01:00
Stephan Kulow
54079e949f Target E202 - Whitespace before ')'
https://www.flake8rules.com/rules/E202.html
2022-02-18 17:18:29 +01:00
Stephan Kulow
529d1dafae Target E302 - add two comment lines before class 2022-02-18 17:15:48 +01:00
Stephan Kulow
4e9c8eabbe Target E305 - Have two empty lines of a class 2022-02-18 17:11:46 +01:00
Stephan Kulow
579145b52c Target F841 - Remove unused variables 2022-02-18 17:01:38 +01:00
Stephan Kulow
0561e06cb1 Target E261 - two spaces before inline comment 2022-02-18 16:39:16 +01:00
Stephan Kulow
d6628beadf Target E125 - Continuation line with same indent
https://www.flake8rules.com/rules/E125.html
2022-02-18 15:52:53 +01:00
Stephan Kulow
66a0f152ff Target E129 - Visually indented line with same indent
https://www.flake8rules.com/rules/E129.html
2022-02-18 15:52:47 +01:00
Jimmy Berry
2a32702b1f
Merge pull request #2310 from jberry-suse/origin-manager-unknown-spelling
osclib/origin: policy_input_calculate(): s/unkown/unknown/.
2019-11-08 16:08:31 -06:00
Jimmy Berry
03a954aebd
Merge pull request #2307 from jberry-suse/origin-manager-automatic-updates-initial-blacklist
osclib/origin: origin_update(): support blacklist patterns for initial updates.
2019-11-08 15:43:46 -06:00
Jimmy Berry
a83e40e057
Merge pull request #2305 from jberry-suse/origin-manager-history-non-annotated
osclib/origin: origin_history(): include non-annotated requests.
2019-11-08 15:19:37 -06:00
Jimmy Berry
7e6455f9ce osclib/origin: policy_input_calculate(): s/unkown/unknown/. 2019-11-08 15:00:15 -06:00
Jimmy Berry
a0488c3fbb
Merge pull request #2303 from jberry-suse/origin-manager-annotate-pending
osclib/origin: origin_annotation_dump(): include pending information.
2019-11-08 14:50:59 -06:00
Jimmy Berry
5f937588e6 osclib/origin: origin_update(): support blacklist patterns for initial updates. 2019-11-08 13:19:04 -06:00
Jimmy Berry
5b4a8d3be5 osclib/origin: origin_history(): include non-annotated requests.
Otherwise, requests that are declined quickly (likely by bot) are not
shown in history which can be confusing when viewing in web interface. A
package may show as being one revision behind and one would wonder why
not update request when in fact a request could have been made and
declined.
2019-11-07 14:13:38 -06:00
Jimmy Berry
62c060a441 osclib/origin: origin_annotation_dump(): include pending information. 2019-11-07 13:46:16 -06:00
Jimmy Berry
dc9147be97 osclib/origin: add maintenance staging equivalent reviews to pending_submission_allowed_reviews. 2019-11-07 10:59:21 -06:00
Jimmy Berry
6826524d07 osclib/origin: drop repo-checker from pending_submission_allowed_reviews.
No longer utilized and the config option has been removed from project
configs so the rule is dropped when evaluated anyway.
2019-11-07 10:59:21 -06:00
Jimmy Berry
e2334dae3d osclib/origin: provide pending_submission_allowed_reviews_update option. 2019-11-07 10:59:21 -06:00
Jimmy Berry
538b39ae3c osclib/origin: reviews_filter_allowed(): support negation rules. 2019-11-07 10:59:21 -06:00
Jimmy Berry
13be4f2ef1 osclib/origin: provide reviews_filter_allowed().
Split out inner logic from policy_input_evaluate_reviews_not_allowed() to
allow for other users.
2019-11-07 10:59:21 -06:00
Jimmy Berry
4bbdfc675e osclib/origin: project_source_pending(): include psuedo incident review. 2019-11-07 10:59:21 -06:00
Jimmy Berry
e771dc653f osclib/origin: provide automatic update mode controls. 2019-11-07 08:46:02 -06:00
Jimmy Berry
8cdd505bea osclib/origin: origin_update_pending() utilize project_remote_prefixed().
Correctly prefix the remote project with the interconnect when creating
a submit request.
2019-11-05 16:39:01 -06:00
Jimmy Berry
6595dd812b osclib/origin: provide origin_updatable_initial().
Provides list of origins for a given project that allow initial updates.
2019-11-05 08:23:40 -06:00
Jimmy Berry
7c162b3c7f osclib/origin: origin_update(): support initial submissions. 2019-11-05 08:23:40 -06:00
Jimmy Berry
8bed8d507e osclib/origin: provide automatic_updates_initial origin config option.
Used to allow new package submissions from an origin.
2019-11-05 08:23:40 -06:00
Jimmy Berry
ea7a454d7e osclib/origin: origin_updatable_map(): provide include_self option. 2019-11-04 14:01:34 -06:00
Jimmy Berry
3b51a7e044 osclib/origin: origin_update() generate change_devel requests.
As a follow-up to new packages accepted from a specific devel generate
a change_devel request automatically. Such requests should be approved
automatically since they are a workaround to not being able to set devel
during source submission.
2019-11-04 14:01:34 -06:00
Jimmy Berry
aa49b57c8e osclib/origin: policy_input_calculate(): handle change from None origin. 2019-11-04 14:01:34 -06:00
Jimmy Berry
790a46cbfc osclib/origin: allow for identical source if origin changed.
Enables change_devel reviews were the source does not change, but the
effective origin will change changed by the request.
2019-11-04 14:01:34 -06:00
Jimmy Berry
c62fb125ef osclib/origin: provide and utilize origin_devel_projects().
Incorporate meta devel, request devel, and whitelist devel into one
function.
2019-11-04 14:01:34 -06:00
Jimmy Berry
683ead7ad6 osclib/origin: provide origin_devel_project() and utlize.
Handles incorporating simulated devel, pseudo devel from requests, and
meta devel project into one function.
2019-11-04 14:01:34 -06:00
Jimmy Berry
d9cc2131ad osclib/origin: provide origin_devel_project_requests().
Determines psuedo devel projects based on pending requests.
2019-11-04 14:01:34 -06:00
Jimmy Berry
83530ce0f6 osclib/origin: provide devel_project_simulate enterable. 2019-11-04 14:01:34 -06:00
Jimmy Berry
a724dcfa9d osclib/origin: require origin key in origin_annotation_load().
Alternatively, this can validate something like "ok: not handled".
2019-11-04 14:01:34 -06:00
Jimmy Berry
2ecb8ce3d7 osclib/origin: provide origin_workaround_strip(). 2019-11-04 14:01:34 -06:00
Jimmy Berry
0b34e1629b osclib/origin: origin_annotation_load(): only return dict annotation.
To improve robustness and handle invalid/corrupt data in the annotation
just return None if it is anything other than a dict after parsing. The
most likely occurrence is someone accepts the origin-manager review with
a plain-text message.
2019-09-25 15:41:02 -05:00
Jimmy Berry
bc0ec5c6c9 osclib/origin: origin_annotation_load(): only consider accepted reviews.
This excludes reviews that were added and never reviewed possibly because
the request was rejected before the review could be accepted. In such
cases the comment specified when adding the review will be loaded as the
annotation which is not desirable.
2019-09-25 15:40:43 -05:00
Jimmy Berry
3842548b45 osclib/origin: provide origin_updatable_map(). 2019-09-11 19:53:01 -05:00
Jimmy Berry
929f8faff7 osclib/origin: provide origin_updatable(). 2019-09-11 19:52:53 -05:00
Jimmy Berry
642809099b
Merge pull request #2175 from jberry-suse/origin-manager-web-history-diff
web/origin-manager: allow a request to be diffed against a potential origin (and related fixes).
2019-08-29 08:02:26 -05:00
Jimmy Berry
edfef91b3d osclib/origin: origin_history(): expose source_(project,package,revision).
This is the best location to expose the information as the action context
is already available. Alternatively, a lookup function accepting a request
target_project and target_package could perform the equivalent of the
client-side filter operation that is part of the initial search. This also
alleviates additional queries that would be needed later.
2019-08-28 17:07:23 -05:00
Jimmy Berry
54c28b6908 osclib/origin: origin_annotation_dump(): allow origin_info_new to be None.
A None origin annotation can be generated when unknown_origin_wait is True
and an override comment is detected.
2019-08-26 15:09:25 -05:00