-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code to handle draft PRs. Also tests.
- Loading branch information
Showing
9 changed files
with
536 additions
and
14 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
57 changes: 57 additions & 0 deletions
57
tests/PRActionData/TestProcessPr.test_draft_pr_assign.json
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,57 @@ | ||
[ | ||
{ | ||
"type": "load-bot-cache", | ||
"data": { | ||
"commits": { | ||
"9138474754099798ff50cb07287e7caa4786f247": { | ||
"files": [ | ||
"FWCore/Utilities/BuildFile.xml" | ||
], | ||
"squashed": false, | ||
"time": 1733482192 | ||
} | ||
}, | ||
"emoji": { | ||
"2523442237": "+1" | ||
}, | ||
"last_seen_sha": "9138474754099798ff50cb07287e7caa4786f247", | ||
"signatures": {} | ||
} | ||
}, | ||
{ | ||
"type": "emoji", | ||
"data": [ | ||
2523442237, | ||
"+1", | ||
true | ||
] | ||
}, | ||
{ | ||
"type": "create-comment", | ||
"data": "New categories assigned: l1\n\n@aloeliger,@epalencia you have been requested to review this Pull request/Issue and eventually sign? Thanks" | ||
}, | ||
{ | ||
"type": "add-label", | ||
"data": [ | ||
"l1-pending" | ||
] | ||
}, | ||
{ | ||
"type": "remove-label", | ||
"data": [] | ||
}, | ||
{ | ||
"type": "edit-comment", | ||
"data": "cms-bot internal usage<!-- bot cache: {\"commits\":{\"9138474754099798ff50cb07287e7caa4786f247\":{\"files\":[\"FWCore/Utilities/BuildFile.xml\"],\"squashed\":false,\"time\":1733482192}},\"emoji\":{\"2523442237\":\"+1\"},\"last_seen_sha\":\"9138474754099798ff50cb07287e7caa4786f247\",\"signatures\":{}} -->" | ||
}, | ||
{ | ||
"type": "status", | ||
"data": { | ||
"commit": "9138474754099798ff50cb07287e7caa4786f247", | ||
"state": "success", | ||
"target_url": "https://github.com/iarspider-cmssw/cmssw/pull/21#issuecomment-2523442237", | ||
"description": "Comment by iarspider at 2024-12-06 15:01:51 UTC processed.", | ||
"context": "bot/21/ack" | ||
} | ||
} | ||
] |
61 changes: 61 additions & 0 deletions
61
tests/PRActionData/TestProcessPr.test_draft_pr_opened.json
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,61 @@ | ||
[ | ||
{ | ||
"type": "load-bot-cache", | ||
"data": { | ||
"commits": { | ||
"9138474754099798ff50cb07287e7caa4786f247": { | ||
"files": [ | ||
"FWCore/Utilities/BuildFile.xml" | ||
], | ||
"squashed": false, | ||
"time": 1733482192 | ||
} | ||
}, | ||
"emoji": {}, | ||
"last_seen_sha": "9138474754099798ff50cb07287e7caa4786f247", | ||
"signatures": {} | ||
} | ||
}, | ||
{ | ||
"type": "status", | ||
"data": { | ||
"commit": "9138474754099798ff50cb07287e7caa4786f247", | ||
"state": "pending", | ||
"target_url": null, | ||
"description": "Waiting for authorized user to issue the test command.", | ||
"context": "bot/21/jenkins" | ||
} | ||
}, | ||
{ | ||
"type": "add-label", | ||
"data": [ | ||
"code-checks-approved" | ||
] | ||
}, | ||
{ | ||
"type": "remove-label", | ||
"data": [ | ||
"code-checks-pending" | ||
] | ||
}, | ||
{ | ||
"type": "status", | ||
"data": { | ||
"commit": "9138474754099798ff50cb07287e7caa4786f247", | ||
"state": "success", | ||
"target_url": "https://github.com/iarspider-cmssw/cmssw/pull/21#issuecomment-2523440118", | ||
"description": "Check details", | ||
"context": "cms/21/code-checks" | ||
} | ||
}, | ||
{ | ||
"type": "status", | ||
"data": { | ||
"commit": "9138474754099798ff50cb07287e7caa4786f247", | ||
"state": "success", | ||
"target_url": "https://github.com/iarspider-cmssw/cmssw/pull/21#issuecomment-2523440118", | ||
"description": "Comment by iarspider at 2024-12-06 15:00:50 UTC processed.", | ||
"context": "bot/21/ack" | ||
} | ||
} | ||
] |
78 changes: 78 additions & 0 deletions
78
tests/PRActionData/TestProcessPr.test_draft_pr_updated.json
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,78 @@ | ||
[ | ||
{ | ||
"type": "load-bot-cache", | ||
"data": { | ||
"commits": { | ||
"9138474754099798ff50cb07287e7caa4786f247": { | ||
"files": [ | ||
"FWCore/Utilities/BuildFile.xml" | ||
], | ||
"squashed": false, | ||
"time": 1733482192 | ||
}, | ||
"28ce3f5888b5433dcae409ee336b2ad422595246": { | ||
"time": 1733495641, | ||
"squashed": false, | ||
"files": [ | ||
"FWCore/Utilities/BuildFile.xml" | ||
] | ||
} | ||
}, | ||
"emoji": { | ||
"2523442237": "+1" | ||
}, | ||
"last_seen_sha": "28ce3f5888b5433dcae409ee336b2ad422595246", | ||
"signatures": {} | ||
} | ||
}, | ||
{ | ||
"type": "emoji", | ||
"data": [ | ||
2523442237, | ||
"+1", | ||
true | ||
] | ||
}, | ||
{ | ||
"type": "status", | ||
"data": { | ||
"commit": "28ce3f5888b5433dcae409ee336b2ad422595246", | ||
"state": "pending", | ||
"target_url": null, | ||
"description": "Waiting for authorized user to issue the test command.", | ||
"context": "bot/21/jenkins" | ||
} | ||
}, | ||
{ | ||
"type": "add-label", | ||
"data": [] | ||
}, | ||
{ | ||
"type": "remove-label", | ||
"data": [] | ||
}, | ||
{ | ||
"type": "status", | ||
"data": { | ||
"commit": "28ce3f5888b5433dcae409ee336b2ad422595246", | ||
"state": "success", | ||
"target_url": "https://github.com/iarspider-cmssw/cmssw/pull/21#issuecomment-2523514208", | ||
"description": "Check details", | ||
"context": "cms/21/code-checks" | ||
} | ||
}, | ||
{ | ||
"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\"},\"last_seen_sha\":\"28ce3f5888b5433dcae409ee336b2ad422595246\",\"signatures\":{}} -->" | ||
}, | ||
{ | ||
"type": "status", | ||
"data": { | ||
"commit": "28ce3f5888b5433dcae409ee336b2ad422595246", | ||
"state": "success", | ||
"target_url": "https://github.com/iarspider-cmssw/cmssw/pull/21#issuecomment-2523514208", | ||
"description": "Comment by iarspider at 2024-12-06 15:36:43 UTC processed.", | ||
"context": "bot/21/ack" | ||
} | ||
} | ||
] |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
110 changes: 110 additions & 0 deletions
110
tests/ReplayData/TestProcessPr.test_draft_pr_updated.txt
Large diffs are not rendered by default.
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