Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle closed PRs too #275

Merged
merged 2 commits into from
Aug 20, 2024
Merged

handle closed PRs too #275

merged 2 commits into from
Aug 20, 2024

Conversation

trz42
Copy link
Contributor

@trz42 trz42 commented Aug 19, 2024

This PR modifies the clean up code such that data of PRs is moved to a trash bin directory also in case the PR was closed.

WIP because it's not been tested yet. Has been tested by @Neves-P. Thanks!

@Neves-P
Copy link
Member

Neves-P commented Aug 20, 2024

Bot log
[20240820-T09:58:09] [handle_pull_request_event]: Handling PR action 'closed' for PR #48... [20240820-T09:58:09] [handle_pull_request_closed_event]: PR 48: PR got merged (json value: True) [20240820-T09:58:09] [handle_pull_request_closed_event]: PR 48: determining directories to be moved to trash bin [20240820-T09:58:09] [handle_pull_request_closed_event]: PR 48: moving directories to trash bin /scratch/f115372/bot_shared_direct ory/trash_bin/Neves-Bot/software-layer/2024.08.20 [20240820-T09:58:17] [handle_pull_request_closed_event]: PR 48: moved directories to trash bin /scratch/f115372/bot_shared_directo ry/trash_bin/Neves-Bot/software-layer/2024.08.20 (took 7 seconds) [20240820-T09:58:20] [handle_issue_comment_event]: Comment in https://api.github.com/repos/Neves-Bot/software-layer/issues/48 (own ed by @neves-p-bot[bot]) created by @neves-p-bot[bot] [20240820-T09:58:20] [handle_issue_comment_event]: comment action 'created' is handled [20240820-T09:58:20] [handle_issue_comment_event]: comment does not contain a bot comment; not processing it further
Bot log
[20240820-T10:18:21] [handle_pull_request_event]: Handling PR action 'closed' for PR #49... [20240820-T10:18:21] [handle_pull_request_closed_event]: PR 49: PR got closed (json value: False) [20240820-T10:18:21] [handle_pull_request_closed_event]: PR 49: determining directories to be moved to trash bin [20240820-T10:18:21] [handle_pull_request_closed_event]: PR 49: moving directories to trash bin /scratch/f115372/bot_shared_directory/trash_bin/Neves-Bot/software-layer/2024.08.20 [20240820-T10:18:28] [handle_pull_request_closed_event]: PR 49: moved directories to trash bin /scratch/f115372/bot_shared_directory/trash_bin/Neves-Bot/software-layer/2024.08.20 (took 7 seconds) [20240820-T10:18:31] [handle_issue_comment_event]: Comment in https://api.github.com/repos/Neves-Bot/software-layer/issues/49 (owned by @neves-p-bot[bot]) created by @neves-p-bot[bot] [20240820-T10:18:31] [handle_issue_comment_event]: comment action 'created' is handled [20240820-T10:18:31] [handle_issue_comment_event]: comment does not contain a bot comment; not processing it further

Looks good!

Copy link
Member

@Neves-P Neves-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only very minor changes to keep the linter happy and update a comment

eessi_bot_event_handler.py Outdated Show resolved Hide resolved
eessi_bot_event_handler.py Outdated Show resolved Hide resolved
@trz42 trz42 marked this pull request as ready for review August 20, 2024 08:57
@trz42 trz42 changed the title [WIP] handle closed PRs too handle closed PRs too Aug 20, 2024
Copy link
Member

@Neves-P Neves-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @truib! 🎉

@Neves-P Neves-P merged commit b4d0ceb into EESSI:develop Aug 20, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants