Skip to content

Commit

Permalink
Test comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wenovus committed Aug 3, 2023
1 parent c19d317 commit 60469ec
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ jobs:

- name: Install models-ci CLI
run: |
go install github.com/openconfig/models-ci@15b19a4
go install github.com/openconfig/models-ci/openconfig-ci@65fa792
- name: Make sure all backward-incompatible changes are covered by version changes.
id: check
run: |
readonly HEAD=${{ github.event.pull_request.head.sha }}
readonly BASE="$(git merge-base origin/master "${HEAD}")"
Expand All @@ -42,19 +43,28 @@ jobs:
models-ci diff --disallowed-incompats --oldp "${oldroot}/third_party" --oldfiles "${oldfiles}" --newp "${newroot}/third_party" --newfiles "${newfiles}"
#echo "-----------List of all YANG node changes-----------" >> "$GITHUB_OUTPUT"
#models-ci diff --oldp "${oldroot}/third_party" --oldfiles "${oldfiles}" --newp "${newroot}/third_party" --newfiles "${newfiles}" >> "$GITHUB_OUTPUT"
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "leafchanges<<$EOF" >> "$GITHUB_ENV"
models-ci diff --oldp "${oldroot}/third_party" --oldfiles "${oldfiles}" --newp "${newroot}/third_party" --newfiles "${newfiles}" >> "$GITHUB_ENV"
echo "$EOF" >> "$GITHUB_ENV"
#body: "${{ env.leafchanges }}"
- name: Post comment listing YANG leaf changes
uses: actions/github-script@v6
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Just a test"
})
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: -----------List of all YANG node changes-----------

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
-----------List of all YANG node changes-----------
${{ env.leafchanges }}
edit-mode: replace
8 changes: 3 additions & 5 deletions release/models/acl/openconfig-acl.yang
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ module openconfig-acl {
packets should be handled. Entries have a type that indicates
the type of match criteria, e.g., MAC layer, IPv4, IPv6, etc.";

oc-ext:openconfig-version "2.0.0";
oc-ext:openconfig-version "1.4.3";

revision "2023-02-06" {
description
"Add clarifying comments on use of interface-ref.";
reference "2.0.0";
reference "1.4.3";
}

revision "2023-01-29" {
Expand Down Expand Up @@ -284,9 +284,7 @@ module openconfig-acl {


leaf forwarding-action {
type identityref {
base FORWARDING_ACTION;
}
type string;
mandatory true;
description
"Specifies the forwarding action. One forwarding action
Expand Down

0 comments on commit 60469ec

Please sign in to comment.