Skip to content

Commit 5c7937e

Browse files
Add code to create PR and change trigger
1 parent fd24057 commit 5c7937e

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/UpdateRuleMetadata.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: Update Rule Metadata
22

3-
on:
4-
push:
5-
branches:
6-
- 'tt/action-update-rule-metadata'
3+
on: workflow_dispatch
74

85
env:
96
RULE_API_VERSION: 2.10.0.4287
10-
PR_BRANCH_NAME: update-rule-metadata
7+
PR_BRANCH_NAME: gh-action/next-iteration
118

129
jobs:
1310
UpdateRuleMetadata_job:
@@ -46,4 +43,9 @@ jobs:
4643
4744
- name: Create PR
4845
run: |
49-
echo TODO
46+
git config user.name "${GITHUB_ACTOR}"
47+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
48+
git checkout -b "${{ env.PR_BRANCH_NAME }}"
49+
git commit -m 'Update rule metadata' -a
50+
git push --set-upstream origin "${{ env.PR_BRANCH_NAME }}"
51+
gh pr create -B master --title 'Update rule metadata' --body ''

0 commit comments

Comments
 (0)