-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
user
, org
, repo
in the github
plugin
Implement filtering by `user`, `org` and `repo` keys to allow limiting the search to specific location. Add basic test coverage.
- Loading branch information
Showing
11 changed files
with
136 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
discover: | ||
how: fmf | ||
provision: | ||
how: local | ||
execute: | ||
how: tmt | ||
|
||
/basic: | ||
summary: | ||
Basic functionality | ||
discover+: | ||
filter: "tag:basic" | ||
|
||
/plugins: | ||
summary: | ||
Plugin features | ||
discover+: | ||
filter: "tag:plugin" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ summary: | |
description: | ||
Create a minimal config file. | ||
Check help message and man page. | ||
tag: basic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[general] | ||
email = "Petr Šplíchal" <[email protected]> | ||
|
||
[gh] | ||
type = github | ||
url = https://api.github.com/ | ||
login = psss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
summary: Verify features of the github plugin | ||
description: | ||
For now just a set of basic checks for supported options. | ||
Ensure that filtering per user, org and repo works. | ||
tag: plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[general] | ||
email = "Petr Šplíchal" <[email protected]> | ||
|
||
[gh] | ||
type = github | ||
url = https://api.github.com/ | ||
login = psss | ||
|
||
# Limit to issues & pull request under the 'teemtee' organization | ||
org = teemtee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[general] | ||
email = "Petr Šplíchal" <[email protected]> | ||
|
||
[gh] | ||
type = github | ||
url = https://api.github.com/ | ||
login = psss | ||
|
||
# Limit to issues & pull request under the 'teemtee/tmt' repository | ||
repo = teemtee/fmf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
. /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
# The default search interval | ||
INTERVAL_2024="--since 2024-03-03 --until 2024-09-09" | ||
INTERVAL_2021="--since 2021-03-03 --until 2021-11-11" | ||
|
||
rlJournalStart | ||
rlPhaseStartTest "Help" | ||
rlRun -s "did --config ./default.ini --help" | ||
for action in created commented closed; do | ||
for what in issues pull-requests; do | ||
rlAssertGrep "--gh-$what-$action" $rlRun_LOG | ||
done | ||
done | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Created" | ||
rlRun -s "did --config ./default.ini --gh-issues-created $INTERVAL_2024" | ||
rlAssertGrep "vim/vim#14964 - Support for syntax highlighting" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#3042 - Make the result of an empty plan" $rlRun_LOG | ||
rlAssertGrep "rpm-software-management/ci-dnf-stack#1487" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Created (org:teemtee)" | ||
rlRun -s "did --config ./org.ini --gh-issues-created $INTERVAL_2024" | ||
rlAssertNotGrep "vim/vim#14964 - Support for syntax highlighting" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#3042 - Make the result of an empty plan" $rlRun_LOG | ||
rlAssertNotGrep "rpm-software-management/ci-dnf-stack#1487" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Created (user:psss)" | ||
rlRun -s "did --config ./user.ini --gh-issues-created $INTERVAL_2021" | ||
rlAssertGrep "psss/did#247 - Implement pagination for the GitHub plugin" $rlRun_LOG | ||
rlAssertNotGrep "packit/packit#1386 - Allow to disable web access" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/tmt#910 - Shall we introduce a uuid for tests?" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Created (repo:teemtee/fmf)" | ||
rlRun -s "did --config ./repo.ini --gh-issues-created $INTERVAL_2021" | ||
rlAssertGrep "teemtee/fmf#141 - Drop support for Python 2" $rlRun_LOG | ||
rlAssertNotGrep "psss/did#247 - Implement pagination for the GitHub plugin" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/tmt#926 - Copying reboot scripts" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlJournalEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[general] | ||
email = "Petr Šplíchal" <[email protected]> | ||
|
||
[gh] | ||
type = github | ||
url = https://api.github.com/ | ||
login = psss | ||
|
||
# Limit to issues & pull request under user 'psss' | ||
user = psss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
summary: Basic smoke test against github | ||
tag: basic |