@@ -28,13 +28,16 @@ jobs:
2828 ref : main
2929 fetch-depth : 0
3030 token : ${{ steps.get_token.outputs.token }}
31+
32+ - name : Configure git user
33+ uses : elastic/oblt-actions/git/setup@v1
34+ with :
35+ github-token : ${{ steps.get_token.outputs.token }}
3136
3237 - name : Fetch upstream
3338 run : |
3439 git remote add upstream https://github.com/open-telemetry/opentelemetry-demo.git
3540 git fetch upstream main
36- env :
37- GITHUB_TOKEN : ${{ steps.get_token.outputs.token }}
3841
3942 - name : Check for upstream changes
4043 id : check
@@ -54,46 +57,86 @@ jobs:
5457
5558 - name : Create Pull Request
5659 if : steps.check.outputs.commits_behind != '0'
57- id : create_pr
58- env :
59- GH_TOKEN : ${{ steps.get_token.outputs.token }}
60- run : |
61- PR_URL=$(gh pr create \
62- --title "chore: merge with upstream opentelemetry-demo" \
63- --body "## Automated upstream merge
60+ id : cpr
61+ uses : peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
62+ with :
63+ token : ${{ steps.get_token.outputs.token }}
64+ branch : " ${{ steps.branch.outputs.branch_name }}"
65+ base : main
66+ title : " chore: Merge with upstream opentelemetry-demo"
67+ body : |
68+ ## Automated upstream merge
69+
70+ This PR merges with the upstream opentelemetry-demo repository.
71+
72+ ### Changes from upstream
73+ - ${{ steps.check.outputs.commits_behind }} new commits
74+
75+ ### If there are conflicts
76+ Check out this branch and resolve them:
77+ \`\`\`bash
78+ git fetch origin ${{ steps.branch.outputs.branch_name }}
79+ git checkout ${{ steps.branch.outputs.branch_name }}
80+ git merge main
81+ # resolve conflicts
82+ git push
83+ \`\`\`
84+
85+ **Note:** If \`src/payment/package.json\` conflicts, take upstream version and add:
86+ \`\`\`json
87+ \"@elastic/opentelemetry-node\": \"1.5.0\"
88+ \`\`\`
89+ And update the start script to:
90+ \`\`\`json
91+ \"start\": \"OTEL_EXPORTER_OTLP_PROTOCOL=grpc node --require @elastic/opentelemetry-node index.js\"
92+ \`\`\`
93+
94+ ---
95+ *This PR was automatically created.*
96+ delete-branch : true
97+
98+ # - name: Create Pull Request
99+ # if: steps.check.outputs.commits_behind != '0'
100+ # id: create_pr
101+ # env:
102+ # GH_TOKEN: ${{ github.token }}
103+ # run: |
104+ # PR_URL=$(gh pr create \
105+ # --title "chore: merge with upstream opentelemetry-demo" \
106+ # --body "## Automated upstream merge
64107
65- This PR merges with the upstream opentelemetry-demo repository.
108+ # This PR merges with the upstream opentelemetry-demo repository.
66109
67- ### Changes from upstream
68- - ${{ steps.check.outputs.commits_behind }} new commits
110+ # ### Changes from upstream
111+ # - ${{ steps.check.outputs.commits_behind }} new commits
69112
70- ### If there are conflicts
71- Check out this branch and resolve them:
72- \`\`\`bash
73- git fetch origin ${{ steps.branch.outputs.branch_name }}
74- git checkout ${{ steps.branch.outputs.branch_name }}
75- git merge main
76- # resolve conflicts
77- git push
78- \`\`\`
113+ # ### If there are conflicts
114+ # Check out this branch and resolve them:
115+ # \`\`\`bash
116+ # git fetch origin ${{ steps.branch.outputs.branch_name }}
117+ # git checkout ${{ steps.branch.outputs.branch_name }}
118+ # git merge main
119+ # # resolve conflicts
120+ # git push
121+ # \`\`\`
79122
80- **Note:** If \`src/payment/package.json\` conflicts, take upstream version and add:
81- \`\`\`json
82- \"@elastic/opentelemetry-node\": \"1.5.0\"
83- \`\`\`
84- And update the start script to:
85- \`\`\`json
86- \"start\": \"OTEL_EXPORTER_OTLP_PROTOCOL=grpc node --require @elastic/opentelemetry-node index.js\"
87- \`\`\`
123+ # **Note:** If \`src/payment/package.json\` conflicts, take upstream version and add:
124+ # \`\`\`json
125+ # \"@elastic/opentelemetry-node\": \"1.5.0\"
126+ # \`\`\`
127+ # And update the start script to:
128+ # \`\`\`json
129+ # \"start\": \"OTEL_EXPORTER_OTLP_PROTOCOL=grpc node --require @elastic/opentelemetry-node index.js\"
130+ # \`\`\`
88131
89- ---
90- *This PR was automatically created.*" \
91- --base main \
92- --head ${{ steps.branch.outputs.branch_name }})
132+ # ---
133+ # *This PR was automatically created.*" \
134+ # --base main \
135+ # --head ${{ steps.branch.outputs.branch_name }})
93136
94- echo "pr_url=${PR_URL}" >> $GITHUB_OUTPUT
95- PR_NUMBER=$(echo "$PR_URL" | grep -oE '[0-9]+$')
96- echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT
137+ # echo "pr_url=${PR_URL}" >> $GITHUB_OUTPUT
138+ # PR_NUMBER=$(echo "$PR_URL" | grep -oE '[0-9]+$')
139+ # echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT
97140
98141 # - name: Enable auto-merge
99142 # if: steps.create_pr.outputs.pr_number != ''
0 commit comments