Skip to content

Commit

Permalink
Add test for triggering tests in draft PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Dec 10, 2024
1 parent dec3551 commit 665223f
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 2 deletions.
3 changes: 1 addition & 2 deletions process_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
NEW_ISSUE_PREFIX,
NEW_PR_PREFIX,
ISSUE_SEEN_MSG,
ISSUE_UPDATED_MSG,
BUILD_REL,
GH_CMSSW_REPO,
GH_CMSDIST_REPO,
Expand Down Expand Up @@ -1488,7 +1487,7 @@ def process_pr(repo_config, gh, repo, issue, dryRun, cmsbuild_user=None, force=F
IGNORING_TESTS_MSG, first_line
):
signatures["tests"] = "pending"
elif re.match(ISSUE_UPDATED_MSG, first_line):
elif re.match("Pull request ([^ #]+|)[#][0-9]+ was updated[.].*", first_line):
pull_request_updated = False
elif re.match(TRIGERING_TESTS_MSG, first_line) or re.match(
TRIGERING_TESTS_MSG1, first_line
Expand Down
100 changes: 100 additions & 0 deletions tests/PRActionData/TestProcessPr.test_draft_pr_start_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
[
{
"type": "load-bot-cache",
"data": {
"commits": {
"28ce3f5888b5433dcae409ee336b2ad422595246": {
"files": [
"FWCore/Utilities/BuildFile.xml"
],
"squashed": false,
"time": 1733495641
},
"9138474754099798ff50cb07287e7caa4786f247": {
"files": [
"FWCore/Utilities/BuildFile.xml"
],
"squashed": false,
"time": 1733482192
}
},
"emoji": {
"2523442237": "+1",
"2532358732": "+1"
},
"last_seen_sha": "28ce3f5888b5433dcae409ee336b2ad422595246",
"signatures": {}
}
},
{
"type": "emoji",
"data": [
2523442237,
"+1",
true
]
},
{
"type": "status",
"data": {
"commit": "28ce3f5888b5433dcae409ee336b2ad422595246",
"state": "success",
"target_url": "https://github.com/iarspider-cmssw/cmssw/pull/21#issuecomment-2532358732",
"description": "Tests requested by iarspider at 2024-12-10 17:30:16 UTC.",
"context": "bot/21/jenkins"
}
},
{
"type": "emoji",
"data": [
2532358732,
"+1",
true
]
},
{
"type": "add-label",
"data": [
"tests-started"
]
},
{
"type": "remove-label",
"data": [
"tests-pending"
]
},
{
"type": "create-property-file",
"data": {
"filename": "trigger-tests-iarspider-cmssw-cmssw-21.properties",
"data": {
"PULL_REQUESTS": "iarspider-cmssw/cmssw#21",
"EXTRA_RELVALS_TESTS": "THREADING GPU HIGH_STATS NANO",
"CONTEXT_PREFIX": "cms/21"
}
}
},
{
"type": "emoji",
"data": [
2532358732,
"+1",
true
]
},
{
"type": "edit-comment",
"data": "cms-bot internal usage<!-- bot cache: {\"commits\":{\"28ce3f5888b5433dcae409ee336b2ad422595246\":{\"files\":[\"FWCore/Utilities/BuildFile.xml\"],\"squashed\":false,\"time\":1733495641},\"9138474754099798ff50cb07287e7caa4786f247\":{\"files\":[\"FWCore/Utilities/BuildFile.xml\"],\"squashed\":false,\"time\":1733482192}},\"emoji\":{\"2523442237\":\"+1\",\"2532358732\":\"+1\"},\"last_seen_sha\":\"28ce3f5888b5433dcae409ee336b2ad422595246\",\"signatures\":{}} -->"
},
{
"type": "status",
"data": {
"commit": "28ce3f5888b5433dcae409ee336b2ad422595246",
"state": "success",
"target_url": "https://github.com/iarspider-cmssw/cmssw/pull/21#issuecomment-2532358732",
"description": "Comment by iarspider at 2024-12-10 17:30:16 UTC processed.",
"context": "bot/21/ack"
}
}
]
Loading

0 comments on commit 665223f

Please sign in to comment.