Skip to content

Commit 7873d93

Browse files
committed
fixes?
1 parent 2f4137b commit 7873d93

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.github/workflows/on-push-do-docs.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: on-push-do-docs
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [mtomka/code-snippets]
66
paths: [ "samples/Snippets/**" ]
77
workflow_dispatch:
88

@@ -43,7 +43,9 @@ jobs:
4343
exit 0
4444
}
4545

46-
$BranchName = "docs/update-docs"
46+
$BranchName = "docs/update-docs-$(Get-Date -Format "yyyyMMddHHmm")
47+
echo "branchName=$BranchName" >> $env:GITHUB_OUTPUT
48+
4749
$GitEmail = "138034000+polly-updater-bot[bot]@users.noreply.github.com"
4850
$GitUser = "polly-updater-bot[bot]"
4951

@@ -63,17 +65,16 @@ jobs:
6365
git commit -m "Update the code-snippets in the documentation"
6466
git push -u origin $BranchName
6567
"updated-docs=true" >> $env:GITHUB_OUTPUT
66-
67-
68+
6869
- name: Generate GitHub application token
6970
if: steps.update-docs.outputs.updated-docs == 'true'
7071
id: generate-application-token
7172
uses: peter-murray/workflow-application-token-action@8e1ba3bf1619726336414f1014e37f17fbadf1db # v2.1.0
7273
with:
73-
application-id: ${{ secrets.POLLY_UPDATER_BOT_APP_ID }}
74-
application-private-key: ${{ secrets.POLLY_UPDATER_BOT_KEY }}
74+
application_id: ${{ secrets.POLLY_UPDATER_BOT_APP_ID }}
75+
application_private_key: ${{ secrets.POLLY_UPDATER_BOT_KEY }}
7576
permissions: "contents:write, pull_requests:write"
76-
77+
7778
- name: Create pull request
7879
if: steps.update-docs.outputs.updated-docs == 'true'
7980
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
@@ -82,11 +83,12 @@ jobs:
8283
script: |
8384
const { repo, owner } = context.repo;
8485
const workflowUrl = `${{ github.server_url }}/${owner}/${repo}/actions/runs/${process.env.GITHUB_RUN_ID}`;
86+
const branchName = "${{ steps.update-docs.outputs.branchName }}";
8587
const result = await github.rest.pulls.create({
8688
title: 'Update the code-snippets in the documentation',
8789
owner,
8890
repo,
89-
head: 'docs/update-docs',
91+
head: branchName,
9092
base: 'main',
9193
body: [
9294
'This PR updates the code-snippets in the documentation.',

samples/Snippets/Core/Snippets.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public static void NonGenericPipeline()
1818
.AddTimeout(TimeSpan.FromSeconds(1))
1919
.Build();
2020

21+
// test
22+
2123
#endregion
2224
}
2325

samples/Snippets/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
Console.WriteLine("Snippets!");
2-
3-
// Path: Snippets\Program.cs

0 commit comments

Comments
 (0)