Skip to content

Commit

Permalink
Update draft handling and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Dec 10, 2024
1 parent 3a04898 commit cd2e19a
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 140 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.pyc
.idea
.idea
*.properties
tests/Framework.py
venv
284 changes: 154 additions & 130 deletions process_pr.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/PRActionData/TestProcessPr.test_assign.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@
"context": "bot/17/ack"
}
}
]
]
8 changes: 4 additions & 4 deletions tests/PRActionData/TestProcessPr.test_close.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
true
]
},
{
"type": "close",
"data": null
},
{
"type": "emoji",
"data": [
Expand All @@ -107,10 +111,6 @@
"type": "remove-label",
"data": []
},
{
"type": "close",
"data": null
},
{
"type": "edit-comment",
"data": "cms-bot internal usage<!-- bot cache: {\"commits\":{\"2a9454e30606b17e52000110972998326ce9e428\":{\"files\":[\"Utilities/ReleaseScripts/test/BuildFile.xml\"],\"squashed\":false,\"time\":1711538467},\"79752f053efecad55dde17732259737e621a1f3f\":{\"files\":[\"Utilities/ReleaseScripts/test/BuildFile.xml\"],\"squashed\":false,\"time\":1712828239},\"dae848e38b8e387d7283a3e35818121487d9d76b\":{\"files\":[\"DQMServices/Components/test/dqmiofilecopy.sh\"],\"squashed\":false,\"time\":1712829250},\"e4d069b76c464274bf6e7d7cf9bac2153ed9a903\":{\"files\":[\"DQMServices/Components/test/dqmiofilecopy.sh\"],\"squashed\":false,\"time\":1712819089}},\"emoji\":{\"2049242908\":\"+1\",\"2049536626\":\"+1\",\"2056736344\":\"+1\",\"2056739513\":\"+1\",\"2056740892\":\"+1\",\"2056796593\":\"+1\",\"2056801055\":\"+1\",\"2056820593\":\"+1\",\"2056903278\":\"+1\",\"2056930228\":\"+1\",\"2056934192\":\"+1\"},\"last_seen_sha\":\"dae848e38b8e387d7283a3e35818121487d9d76b\",\"signatures\":{\"2049242908\":\"2a9454e30606b17e52000110972998326ce9e428\"}} -->"
Expand Down
4 changes: 4 additions & 0 deletions tests/PRActionData/TestProcessPr.test_draft_pr_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
"context": "cms/21/code-checks"
}
},
{
"type": "create-comment",
"data": "Pull request #21 was updated."
},
{
"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\":{}} -->"
Expand Down
8 changes: 4 additions & 4 deletions tests/PRActionData/TestProcessPr.test_reopen.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
true
]
},
{
"type": "open",
"data": null
},
{
"type": "emoji",
"data": [
Expand All @@ -116,10 +120,6 @@
"type": "remove-label",
"data": []
},
{
"type": "open",
"data": null
},
{
"type": "edit-comment",
"data": "cms-bot internal usage<!-- bot cache: {\"commits\":{\"2a9454e30606b17e52000110972998326ce9e428\":{\"files\":[\"Utilities/ReleaseScripts/test/BuildFile.xml\"],\"squashed\":false,\"time\":1711538467},\"79752f053efecad55dde17732259737e621a1f3f\":{\"files\":[\"Utilities/ReleaseScripts/test/BuildFile.xml\"],\"squashed\":false,\"time\":1712828239},\"dae848e38b8e387d7283a3e35818121487d9d76b\":{\"files\":[\"DQMServices/Components/test/dqmiofilecopy.sh\"],\"squashed\":false,\"time\":1712829250},\"e4d069b76c464274bf6e7d7cf9bac2153ed9a903\":{\"files\":[\"DQMServices/Components/test/dqmiofilecopy.sh\"],\"squashed\":false,\"time\":1712819089}},\"emoji\":{\"2049242908\":\"+1\",\"2049536626\":\"+1\",\"2056736344\":\"+1\",\"2056739513\":\"+1\",\"2056740892\":\"+1\",\"2056796593\":\"+1\",\"2056801055\":\"+1\",\"2056820593\":\"+1\",\"2056903278\":\"+1\",\"2056930228\":\"+1\",\"2056934192\":\"+1\",\"2056935714\":\"+1\"},\"last_seen_sha\":\"dae848e38b8e387d7283a3e35818121487d9d76b\",\"signatures\":{\"2049242908\":\"2a9454e30606b17e52000110972998326ce9e428\"}} -->"
Expand Down
1 change: 1 addition & 0 deletions tests/run_pr_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if [ $INSTALL_REQS -eq 1 ]; then
python3 -m pip install --upgrade pip
pip install -r test-requirements.txt
fi

if [ ! -e Framework.py ]; then
curl -L https://github.com/PyGithub/PyGithub/raw/v1.54/tests/Framework.py > Framework.py
sed -i -e 's/self\.retry/self.retry, per_page=100/g' Framework.py
Expand Down

0 comments on commit cd2e19a

Please sign in to comment.