Skip to content

Commit de8f6fb

Browse files
eavanvalkenburgglorious-beard
authored andcommitted
use env variables for new issue (microsoft#11327)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Fixes the needs port to label workflow to use env variables ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
1 parent f7685ce commit de8f6fb

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

.github/workflows/label-needs-port.yml

+26-8
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,39 @@ jobs:
2121
steps:
2222
- name: Create dotnet issue
2323
if: contains(github.event.pull_request.labels.*.name, 'needs_port_to_dotnet') || contains(github.event.issue.labels.*.name, 'needs_port_to_dotnet')
24+
env:
25+
ORIGINAL_URL: ${{ github.event.issue.html_url || github.event.pull_request.html_url }}
26+
ORIGINAL_BODY: ${{ github.event.issue.body || github.event.pull_request.body }}
27+
ORIGINAL_TITLE: ${{ github.event.issue.title || github.event.pull_request.title }}
28+
ORIGINAL_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
2429
run: |
30+
{
31+
echo "# Original issue"
32+
echo "$ORIGINAL_URL"
33+
echo "## Description"
34+
echo "$ORIGINAL_BODY"
35+
echo "\n Relates to #$ORIGINAL_NUMBER"
36+
} > issue_body.md
2537
new_issue_url=$(gh issue create \
2638
--title "Port python feature: ${{ github.event.issue.title || github.event.pull_request.title }}" \
2739
--label ".NET" \
28-
--body "# Original issue
29-
${{ github.event.issue.html_url || github.event.pull_request.html_url }}
30-
## Description
31-
${{ github.event.issue.body || github.event.pull_request.body }}")
40+
--body-file issue_body.md)
3241
- name: Create python issue
3342
if: contains(github.event.pull_request.labels.*.name, 'needs_port_to_python') || contains(github.event.issue.labels.*.name, 'needs_port_to_python')
43+
env:
44+
ORIGINAL_URL: ${{ github.event.issue.html_url || github.event.pull_request.html_url }}
45+
ORIGINAL_BODY: ${{ github.event.issue.body || github.event.pull_request.body }}
46+
ORIGINAL_TITLE: ${{ github.event.issue.title || github.event.pull_request.title }}
47+
ORIGINAL_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
3448
run: |
49+
{
50+
echo "# Original issue"
51+
echo "$ORIGINAL_URL"
52+
echo "## Description"
53+
echo "$ORIGINAL_BODY"
54+
echo "\n Relates to #$ORIGINAL_NUMBER"
55+
} > issue_body.md
3556
new_issue_url=$(gh issue create \
3657
--title "Port dotnet feature: ${{ github.event.issue.title || github.event.pull_request.title }}" \
3758
--label "python" \
38-
--body "# Original issue
39-
${{ github.event.issue.html_url || github.event.pull_request.html_url }}
40-
## Description
41-
${{ github.event.issue.body || github.event.pull_request.body }}")
59+
--body-file issue_body.md)

0 commit comments

Comments
 (0)