TZ needs to be defined, otherwise it was assumed to be local which
then resulted in unpredictable commit hashes. We define it to UTC
for unit tests
PR have state "open" not "opened"
Using the BuildDisableRepos configuration, it is now possible to
define which repositories to build-disable in the QA project meta.
This is for example useful for the SLES development workflow, where
the product repository should only be enabled after the packagelist
definitions have been built - so it is not desirable to have them
built as soon as the QA project is created.
Example:
{
"ObsProject": "SUSE:SLFO:Main",
"StagingProject": "SUSE:SLFO:Main:PullRequest",
"QA": [
{
"Name": "SLES",
"Origin": "SUSE:SLFO:Products:SLES:16.1",
"BuildDisableRepos": ["product"]
}
]
}
Signed-off-by: Eugenio Paolantonio <eugenio.paolantonio@suse.com>
Implement ReviewRequired option to workflow.config. This will
always require a review by maintainer, unless no other maintainers
are available.
By default, ReviewRequired is false
Implement ReviewRequired option to workflow.config. This will
always require a review by maintainer, unless no other maintainers
are available.
By default, AlwaysRequireReview is false
- Add a test case specifically verifying that `Gitea.SetLabels`
is called with `staging/Auto` when a *new* project PR is created
for submodules.
- Verify `PrjGitDescription` and `SetSubmodulesToMatchPRSet` behave
correctly when a single `PRSet` contains 5+ different package
repositories.
Also,
- Add simple unit tests to verify mapping of `models.StateType`
to internal event strings.
- Verify it correctly wraps `ProcesPullRequest` and handles panics
via the deferred recovery block.
- Add tests for scenarios where `GetRecentPullRequests` fails.
- Verify the random sleep interval logic (can be tested by mocking
`time.Sleep` if refactored, or verifying behavior with interval=0).
- PullRequestWebhookEvent: Verified that PR events correctly
trigger processing with all necessary Gitea and Git mocks.
- IssueCommentWebhookEvent: Verified that issue comment events
(which Gitea often uses for PR comments) are handled correctly.
- Recursion Limit: Verified that the recursion protection logic
correctly terminates and cleans up when the limit is reached.
- Invalid Data Format: Verified that non-event data types return
appropriate errors.
- Add scenarios for closed/merged project PRs that trigger
submodule checks and downstream PR updates (manual merge vs close).
- Test the "Consistency check" logic where submodules are reset
if they don't match the PR set.
- Test the "superfluous PR" check (no-op PRs that should be closed).