@@ -15,31 +15,23 @@ jobs:
15
15
with :
16
16
github-token : ${{secrets.GITHUB_TOKEN}}
17
17
script : |
18
- console.log('Starting script');
19
18
const { issue, comment } = context.payload;
20
- console.log('Issue:', issue);
21
- console.log('Comment:', comment);
22
19
23
20
if (!issue || !issue.pull_request || !comment || !comment.body.startsWith('/release to ')) {
24
- console.log('Not a valid release command');
25
21
core.setFailed('Not a valid release command on a pull request.');
26
22
return;
27
23
}
28
24
29
- console.log('Valid release command');
30
25
const releaseBranch = comment.body.split('/release to ')[1].trim();
31
- console.log('Release branch:', releaseBranch);
32
26
core.setOutput('release_branch', releaseBranch);
33
27
core.setOutput('pr_number', issue.number);
34
28
35
- console.log('Creating comment');
36
29
await github.rest.issues.createComment({
37
30
issue_number: issue.number,
38
31
owner: context.repo.owner,
39
32
repo: context.repo.name,
40
33
body: '🔄 Cherry-pick operation started. Please wait...'
41
34
});
42
- console.log('Comment created');
43
35
44
36
- name : Checkout repository
45
37
uses : actions/checkout@v3
81
73
git pull
82
74
git checkout -b $BRANCH_NAME
83
75
if ! git cherry-pick -x $GITHUB_CHERRY_PICK_COMMIT; then
84
- echo "Cherry-pick failed. Manual intervention required."
85
76
git add -A
86
77
git -c core.editor=true cherry-pick --continue --no-edit || true
87
78
MERGE_FAILED=1
0 commit comments