diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6bf5287 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,62 @@ +name: Tests + +on: + push: + branches: + - master + - release + - updates + pull_request: + workflow_dispatch: {} + +defaults: + run: + shell: bash + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + env: + BUILD_TYPE: Debug + GSL_CXX_STANDARD: 17 + CMAKE_DIR: "${GITHUB_WORKSPACE}/deps" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Cache + id: cache + uses: actions/cache@v3 + with: + path: ~/rapidjson.deb + key: deps-rapidjson-1.1.0 + + - name: Install rapidjson + if: steps.cache.outputs.cache-hit != 'true' + run: | + wget "https://launchpad.net/ubuntu/+source/rapidjson/1.1.0+dfsg2-3/+build/14513429/+files/rapidjson-dev_1.1.0+dfsg2-3_all.deb" -O rapidjson.deb + sudo dpkg -i rapidjson.deb + + - name: Install toolchain + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update + + - name: Setup git user + run: | + git config --global user.name Tester + git config --global user.email tester@localhost + + - name: Build + run: | + mkdir build && cd build + cmake .. -DRAPIDJSON_BUILD_CXX11=OFF + make + + - name: Test + run: | + ./mustard_tests + working-directory: build diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6f695d0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: cpp -compiler: clang - -os: linux -dist: focal - -env: BUILD_TYPE=Debug GSL_CXX_STANDARD=17 - -addons: - apt: - update: true - sources: - - ubuntu-toolchain-r-test -before_install: - - wget "https://launchpad.net/ubuntu/+source/rapidjson/1.1.0+dfsg2-3/+build/14513429/+files/rapidjson-dev_1.1.0+dfsg2-3_all.deb" - - sudo dpkg -i rapidjson*.deb - - CMAKE_DIR="${TRAVIS_BUILD_DIR}/deps" - - mkdir ${CMAKE_DIR} && cd ${CMAKE_DIR} - - wget https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-x86_64.tar.gz - - tar -xvf cmake-3.20.1-linux-x86_64.tar.gz > /dev/null - - mv cmake-3.20.1-linux-x86_64 cmake-install - - PATH=${CMAKE_DIR}/cmake-install:${CMAKE_DIR}/cmake-install/bin:$PATH - - cd ${TRAVIS_BUILD_DIR} -script: - - mkdir build - - cd build - - cmake .. -DRAPIDJSON_BUILD_CXX11=OFF - - make - - ./mustard_tests diff --git a/README.md b/README.md index a5a0916..4c11154 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://app.travis-ci.com/TNG/mustard-cli.svg?branch=release)](https://travis-ci.com/github/TNG/mustard-cli) +[![Build Status](https://github.com/TNG/mustard-cli/actions/workflows/build.yml/badge.svg?branch=release)](https://github.com/TNG/mustard-cli/actions/workflows/build.yml) # Mustard - A Bitbucket CLI ## What is it? Mustard is a command line interface for bitbucket that facilitates reviewing and commenting pull requests. It loads the designated changes of the PR as if they would have been made locally on the target branch. @@ -23,7 +23,7 @@ Mustard is a command line interface for bitbucket that facilitates reviewing and ### mustard autoconf On the first run in a repo new to mustard, autoconf tries to guess the BitBucket server location by the origin's remote URL. These settings will be persisted in the git config of the repository, using the following values: - + [mustard] bitbucket = bitbucket.example.com repositorySlug = mustard @@ -34,12 +34,12 @@ Mustard is a command line interface for bitbucket that facilitates reviewing and ### mustard passwd You can change your saved username and password using this command. Alternatively one may change it directly via libsecret, for example using 'seahorse'. - + ### mustard inbox Displays all pull requests with a quick status that are on your bitbucket inbox. If mustard detects that a PR is for the currently checked out repo, it is being assigned a number. Mustard then will ask if you want to fetch and check out one of the PRs in the current repo and whether to start reviewing it. - + ### mustard info Searches for the pullrequest of the current checked out feature branch and displays basic information about it. ### mustard start @@ -48,35 +48,35 @@ one of the PRs in the current repo and whether to start reviewing it. for review. If there are comments in BitBucket, it inserts them as MultilineComments in the working tree. #### Making comments You can look around and make comments that should be posted to Bitbucket by marking them with a tilde: - + echo "Hello World\n"; //~This is a comment on a line - + echo "Some other line\n"; /*~ This is a multiLineComment * Keep in mind to insert a new line and do not re-use an empty one. * If you re-used an existing line, the comments below may be posted on the wrong lines. */ - + #### Replying to comments You can extend an existing multiline comment section marked to contain the comment of another author starting by @reply: - + /*~imgrundm@1~ * I do not think it is a good idea to rm -rf the hard disk of the customer * @reply Me neiher, but the upside is, she will have space left on device */ - + ### mustard stop Mustard stop resets the head of the feature branch and extracts the comments you have made. It then asks you whether you'd like to do the following: - reset the remaining working tree changes (not undoable!) - post the comments to BitBucket - mark the PR as approved, needs work, or just quit - + ### Debug option If a problem occurs you may add --debug to the commandline to output a debug log including the requests and responses sent to the SCM server . ### Do not verify ssl If you set the option `git config --add mustard.connectInsecure true `, mustard will not check the ssl certificate when communicating to bitbucket. Enable this option only if you know what you are doing. - + ## Known Bugs & issues - mustard cannot cope with a BitBucket server that is not on 'origin' - comments on whole files are not working