-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement filtering by `user`, `org` and `repo` keys to allow limiting the search to specific location. Add basic test coverage. Fix #86.
- Loading branch information
Showing
18 changed files
with
323 additions
and
12 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: "tier:0" | ||
|
||
/plugins: | ||
summary: | ||
Plugin features | ||
discover+: | ||
filter: "tier:1" |
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 |
File renamed without changes.
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 @@ | ||
tier: 0 |
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 |
File renamed without changes.
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,10 @@ | ||
[general] | ||
email = "Petr Šplíchal" <[email protected]> | ||
|
||
[gh] | ||
type = github | ||
url = https://api.github.com/ | ||
login = psss | ||
|
||
# Limit to multiple organizations | ||
org = teemtee,packit |
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/fmf' 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,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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
. /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
rlJournalStart | ||
rlPhaseStartTest "Help" | ||
rlRun -s "did --config ./config-default.ini --help" | ||
rlAssertGrep "GitHub work" $rlRun_LOG | ||
for what in issues pull-requests; do | ||
for action in created commented closed; do | ||
rlAssertGrep "--gh-$what-$action" $rlRun_LOG | ||
done | ||
done | ||
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,86 @@ | ||
#!/bin/bash | ||
. /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
YEAR_2021="--since 2021-01-01 --until 2021-12-31" | ||
YEAR_2022="--since 2022-01-01 --until 2022-12-31" | ||
YEAR_2023="--since 2023-01-01 --until 2023-12-31" | ||
|
||
rlJournalStart | ||
|
||
# Issues Created | ||
|
||
rlPhaseStartTest "Issues Created" | ||
rlRun -s "did --config ./config-default.ini --gh-issues-created $YEAR_2022" | ||
rlAssertGrep "Issues created on gh: 31$" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#1737 - Introduce a new step for cleanup tasks" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#149 - Checkout of the default branch fails" $rlRun_LOG | ||
rlAssertGrep "packit/packit-service#1645 - Manually trigger internal jobs" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Created (org:teemtee)" | ||
rlRun -s "did --config ./config-org.ini --gh-issues-created $YEAR_2022" | ||
rlAssertGrep "Issues created on gh: 30$" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#1737 - Introduce a new step for cleanup tasks" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#149 - Checkout of the default branch fails" $rlRun_LOG | ||
rlAssertNotGrep "packit/packit-service#1645 - Manually trigger internal jobs" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Created (org:teemtee,packit)" | ||
rlRun -s "did --config ./config-more.ini --gh-issues-created $YEAR_2023" | ||
rlAssertGrep "Issues created on gh: 33$" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#2493 - Implement retry functionality" $rlRun_LOG | ||
rlAssertGrep "packit/packit#1989 - Mention branch name" $rlRun_LOG | ||
rlAssertNotGrep "readthedocs/sphinx_rtd_theme#1525 - Left menu" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Created (repo:teemtee/fmf)" | ||
rlRun -s "did --config ./config-repo.ini --gh-issues-created $YEAR_2022" | ||
rlAssertGrep "Issues created on gh: 2$" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/tmt#1737 - Introduce a new step for cleanup tasks" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#149 - Checkout of the default branch fails" $rlRun_LOG | ||
rlAssertNotGrep "packit/packit-service#1645 - Manually trigger internal jobs" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Created (user:psss)" | ||
rlRun -s "did --config ./config-user.ini --gh-issues-created $YEAR_2021" | ||
rlAssertGrep "Issues created on gh: 1$" $rlRun_LOG | ||
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 | ||
|
||
# Issues Closed | ||
|
||
rlPhaseStartTest "Issues Closed" | ||
rlRun -s "did --config ./config-default.ini --gh-issues-closed $YEAR_2022" | ||
rlAssertGrep "Issues closed on gh: 17$" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#014 - Define a way how to undefine an attribute" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#991 - Incompatible environment variable name" $rlRun_LOG | ||
rlAssertGrep "psss/did#269 - Invalid plugin type 'google'" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Closed (org:teemtee)" | ||
rlRun -s "did --config ./config-org.ini --gh-issues-closed $YEAR_2022" | ||
rlAssertGrep "Issues closed on gh: 15$" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#014 - Define a way how to undefine an attribute" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#991 - Incompatible environment variable name" $rlRun_LOG | ||
rlAssertNotGrep "psss/did#269 - Invalid plugin type 'google'" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Closed (repo:teemtee/fmf)" | ||
rlRun -s "did --config ./config-repo.ini --gh-issues-closed $YEAR_2022" | ||
rlAssertGrep "Issues closed on gh: 3$" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#014 - Define a way how to undefine an attribute" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/tmt#991 - Incompatible environment variable name" $rlRun_LOG | ||
rlAssertNotGrep "psss/did#269 - Invalid plugin type 'google'" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Issues Closed (user:psss)" | ||
rlRun -s "did --config ./config-user.ini --gh-issues-closed $YEAR_2022" | ||
rlAssertGrep "Issues closed on gh: 1$" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/fmf#014 - Define a way how to undefine an attribute" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/tmt#991 - Incompatible environment variable name" $rlRun_LOG | ||
rlAssertGrep "psss/did#269 - Invalid plugin type 'google'" $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,11 @@ | ||
/help: | ||
summary: Check the help message and option sanity | ||
test: ./help.sh | ||
|
||
/pulls: | ||
summary: Verify pull request stats | ||
test: ./pulls.sh | ||
|
||
/issues: | ||
summary: Verify issue stats | ||
test: ./issues.sh |
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,108 @@ | ||
#!/bin/bash | ||
. /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
YEAR_2022="--since 2022-01-01 --until 2022-12-31" | ||
YEAR_2021="--since 2021-01-01 --until 2021-12-31" | ||
|
||
rlJournalStart | ||
|
||
# Pull Requests Created | ||
|
||
rlPhaseStartTest "Pull Requests Created" | ||
rlRun -s "did --config ./config-default.ini --gh-pull-requests-created $YEAR_2022" | ||
rlAssertGrep "Pull requests created on gh: 94$" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#1750 - Include the new web link in verbose" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#170 - Implement a directive for disabling inheritance" $rlRun_LOG | ||
rlAssertGrep "teemtee/try#002 - Check logs for test with a hash sign in" $rlRun_LOG | ||
rlAssertGrep "psss/did#275 - Speed up local testing" $rlRun_LOG | ||
rlAssertGrep "psss/python-nitrate#039 - Enable basic sanity" $rlRun_LOG | ||
rlAssertGrep "packit/packit.dev#399 - Update \`tmt\` examples" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Pull Requests Created (org:teemtee)" | ||
rlRun -s "did --config ./config-org.ini --gh-pull-requests-created $YEAR_2022" | ||
rlAssertGrep "Pull requests created on gh: 85$" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#1750 - Include the new web link in verbose" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#170 - Implement a directive for disabling inheritance" $rlRun_LOG | ||
rlAssertGrep "teemtee/try#002 - Check logs for test with a hash sign in" $rlRun_LOG | ||
rlAssertNotGrep "psss/did#275 - Speed up local testing" $rlRun_LOG | ||
rlAssertNotGrep "psss/python-nitrate#039 - Enable basic sanity" $rlRun_LOG | ||
rlAssertNotGrep "packit/packit.dev#399 - Update \`tmt\` examples" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Pull Requests Created (org:teemtee,packit)" | ||
rlRun -s "did --config ./config-more.ini --gh-pull-requests-created $YEAR_2022" | ||
rlAssertGrep "Pull requests created on gh: 86$" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#1750 - Include the new web link in verbose" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#170 - Implement a directive for disabling inheritance" $rlRun_LOG | ||
rlAssertGrep "teemtee/try#002 - Check logs for test with a hash sign in" $rlRun_LOG | ||
rlAssertNotGrep "psss/did#275 - Speed up local testing" $rlRun_LOG | ||
rlAssertNotGrep "psss/python-nitrate#039 - Enable basic sanity" $rlRun_LOG | ||
rlAssertGrep "packit/packit.dev#399 - Update \`tmt\` examples" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Pull Requests Created (repo:teemtee/fmf)" | ||
rlRun -s "did --config ./config-repo.ini --gh-pull-requests-created $YEAR_2022" | ||
rlAssertGrep "Pull requests created on gh: 7$" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/tmt#1750 - Include the new web link in verbose" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#170 - Implement a directive for disabling inheritance" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/try#002 - Check logs for test with a hash sign in" $rlRun_LOG | ||
rlAssertNotGrep "psss/did#275 - Speed up local testing" $rlRun_LOG | ||
rlAssertNotGrep "psss/python-nitrate#039 - Enable basic sanity" $rlRun_LOG | ||
rlAssertNotGrep "packit/packit.dev#399 - Update \`tmt\` examples" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Pull Requests Created (user:psss)" | ||
rlRun -s "did --config ./config-user.ini --gh-pull-requests-created $YEAR_2022" | ||
rlAssertGrep "Pull requests created on gh: 7$" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/tmt#1750 - Include the new web link in verbose" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/fmf#170 - Implement a directive for disabling inheritance" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/try#002 - Check logs for test with a hash sign in" $rlRun_LOG | ||
rlAssertGrep "psss/did#275 - Speed up local testing" $rlRun_LOG | ||
rlAssertGrep "psss/python-nitrate#039 - Enable basic sanity" $rlRun_LOG | ||
rlAssertNotGrep "packit/packit.dev#399 - Update \`tmt\` examples" $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
# Pull Requests Closed | ||
|
||
rlPhaseStartTest "Pull Requests Closed" | ||
rlRun -s "did --config ./config-default.ini --gh-pull-requests-closed $YEAR_2022" | ||
rlAssertGrep "Pull requests closed on gh: 315$" $rlRun_LOG | ||
rlAssertGrep "psss/did#272 - Koji plugin" $rlRun_LOG | ||
rlAssertGrep "psss/python-nitrate#038 - Properly handle string" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#177 - Shallow git clone if no reference" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#1050 - Run commands via bash" $rlRun_LOG | ||
rlAssertGrep "teemtee/upgrade#006 - Store the old packages " $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Pull Requests Closed (org:teemtee)" | ||
rlRun -s "did --config ./config-org.ini --gh-pull-requests-closed $YEAR_2022" | ||
rlAssertGrep "Pull requests closed on gh: 305$" $rlRun_LOG | ||
rlAssertNotGrep "psss/did#272 - Koji plugin" $rlRun_LOG | ||
rlAssertNotGrep "psss/python-nitrate#038 - Properly handle string" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#177 - Shallow git clone if no reference" $rlRun_LOG | ||
rlAssertGrep "teemtee/tmt#1050 - Run commands via bash" $rlRun_LOG | ||
rlAssertGrep "teemtee/upgrade#006 - Store the old packages " $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Pull Requests Closed (repo:teemtee/fmf)" | ||
rlRun -s "did --config ./config-repo.ini --gh-pull-requests-closed $YEAR_2022" | ||
rlAssertGrep "Pull requests closed on gh: 13$" $rlRun_LOG | ||
rlAssertNotGrep "psss/did#272 - Koji plugin" $rlRun_LOG | ||
rlAssertNotGrep "psss/python-nitrate#038 - Properly handle string" $rlRun_LOG | ||
rlAssertGrep "teemtee/fmf#177 - Shallow git clone if no reference" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/tmt#1050 - Run commands via bash" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/upgrade#006 - Store the old packages " $rlRun_LOG | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "Pull Requests Closed (user:psss)" | ||
rlRun -s "did --config ./config-user.ini --gh-pull-requests-closed $YEAR_2022" | ||
rlAssertGrep "Pull requests closed on gh: 10$" $rlRun_LOG | ||
rlAssertGrep "psss/did#272 - Koji plugin" $rlRun_LOG | ||
rlAssertGrep "psss/python-nitrate#038 - Properly handle string" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/fmf#177 - Shallow git clone if no reference" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/tmt#1050 - Run commands via bash" $rlRun_LOG | ||
rlAssertNotGrep "teemtee/upgrade#006 - Store the old packages " $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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
test: ./test.sh | ||
framework: beakerlib | ||
require: did | ||
tier: 1 |
5b266fa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on your Packit configuration the settings of the psss/did Copr project would need to be updated as follows:
Packit was unable to update the settings above as it is missing
admin
permissions on the psss/did Copr project.To fix this you can do one of the following:
admin
permissions on the psss/did Copr project on the permissions page.Please retrigger the build, once the issue above is fixed.