Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 40ebf54

Browse files
Fix issue #345: Add warnings for migration (#352)
* Fix issue #345: Add warnings for migration * Fix pr #352: Fix issue #345: Add warnings for migration
1 parent e2f551d commit 40ebf54

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.github/workflows/openhands-resolver.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
issue_number: ${{ env.ISSUE_NUMBER }},
139139
owner: context.repo.owner,
140140
repo: context.repo.repo,
141-
body: `OpenHands started fixing the ${issueType}! You can monitor the progress [here](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).`
141+
body: `OpenHands started fixing the ${issueType}! You can monitor the progress [here](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}).\n\n> ALERT: message from your friendly neighborhood code agent -> this is an old version of the OpenHands github resolver. It has been moved to https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/resolver`
142142
});
143143
144144
- name: Install dependencies
@@ -244,27 +244,27 @@ jobs:
244244
issue_number: issueNumber,
245245
owner: context.repo.owner,
246246
repo: context.repo.repo,
247-
body: `The workflow to fix this issue encountered an error. Openhands failed to create any code changes.`
247+
body: `The workflow to fix this issue encountered an error. Openhands failed to create any code changes.\n\n> ALERT: message from your friendly neighborhood code agent -> this is an old version of the OpenHands github resolver. It has been moved to https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/resolver`
248248
});
249249
} else if (success && prNumber) {
250250
github.rest.issues.createComment({
251251
issue_number: issueNumber,
252252
owner: context.repo.owner,
253253
repo: context.repo.repo,
254-
body: `A potential fix has been generated and a draft PR #${prNumber} has been created. Please review the changes.`
254+
body: `A potential fix has been generated and a draft PR #${prNumber} has been created. Please review the changes.\n\n> ALERT: message from your friendly neighborhood code agent -> this is an old version of the OpenHands github resolver. It has been moved to https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/resolver`
255255
});
256256
} else if (!success && branchName) {
257257
github.rest.issues.createComment({
258258
issue_number: issueNumber,
259259
owner: context.repo.owner,
260260
repo: context.repo.repo,
261-
body: `An attempt was made to automatically fix this issue, but it was unsuccessful. A branch named '${branchName}' has been created with the attempted changes. You can view the branch [here](https://github.com/${context.repo.owner}/${context.repo.repo}/tree/${branchName}). Manual intervention may be required.`
261+
body: `An attempt was made to automatically fix this issue, but it was unsuccessful. A branch named '${branchName}' has been created with the attempted changes. You can view the branch [here](https://github.com/${context.repo.owner}/${context.repo.repo}/tree/${branchName}). Manual intervention may be required.\n\n> ALERT: message from your friendly neighborhood code agent -> this is an old version of the OpenHands github resolver. It has been moved to https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/resolver`
262262
});
263263
} else {
264264
github.rest.issues.createComment({
265265
issue_number: issueNumber,
266266
owner: context.repo.owner,
267267
repo: context.repo.repo,
268-
body: `The workflow to fix this issue encountered an error. Please check the workflow logs for more information.`
268+
body: `The workflow to fix this issue encountered an error. Please check the workflow logs for more information.\n\n> ALERT: message from your friendly neighborhood code agent -> this is an old version of the OpenHands github resolver. It has been moved to https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/resolver`
269269
});
270270
}

examples/openhands-resolver.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Resolve Issue with OpenHands
22

3+
# ALERT: message from your friendly neighborhood code agent -> this is an old version of the OpenHands github resolver. It has been moved to https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/resolver
4+
35
on:
46
issues:
57
types: [labeled]

openhands_resolver/__init__.py

+10
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
__version__ = "0.3.1"
2+
3+
import warnings
4+
5+
warnings.warn(
6+
"\nDEPRECATION WARNING: This is an old version of the OpenHands resolver. "
7+
"It has been moved to https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/resolver\n"
8+
"Please update your dependencies to use the new version.",
9+
DeprecationWarning,
10+
stacklevel=2
11+
)

0 commit comments

Comments
 (0)