From 8783a6ff4a49f6d1a0edfab38fbb1ef2af9975df Mon Sep 17 00:00:00 2001 From: Tyler Weaver Date: Tue, 23 Mar 2021 17:16:19 -0600 Subject: [PATCH] try the format fails comment action --- .github/workflows/format.yml | 12 ++++++++++++ src/query_results.cpp | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index fa91702..471ce71 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -18,3 +18,15 @@ jobs: - name: Install clang-format-10 run: sudo apt-get install clang-format-10 - uses: pre-commit/action@v2.0.0 + - name: Comment on PR if checks fail + if: failure() + uses: actions/github-script@0.9.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'The format checks failed :(, Here are instructions for running pre-commit to fix the formatting: https://github.com/ros-planning/moveit2/wiki/pre-commit.' + }) diff --git a/src/query_results.cpp b/src/query_results.cpp index 880cb76..1e931b9 100644 --- a/src/query_results.cpp +++ b/src/query_results.cpp @@ -99,4 +99,4 @@ mongo::BSONObj MongoResultIterator::metadataRaw() const return next_->copy(); } -} // namespace warehouse_ros_mongo +} // warehouse_ros_mongo