diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml new file mode 100644 index 0000000000..9be634ac30 --- /dev/null +++ b/.github/workflows/copyright.yml @@ -0,0 +1,40 @@ +name: Copyright +on: + issue_comment: + types: [created] +jobs: + edit: + name: Copyright + if: ${{ github.event.comment.body == '@votca-bot copyright' }} + runs-on: ubuntu-latest + steps: + - name: Check if message comes from PR + uses: octokit/request-action@v2.x + id: issue_info + with: + route: GET /repos/:repository/issues/:pull_number + repository: ${{ github.repository }} + pull_number: ${{ github.event.issue.number }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get PR info + if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }} + uses: octokit/request-action@v2.x + id: pr_info + with: + route: GET /repos/:repository/pulls/:pull_number + repository: ${{ github.repository }} + pull_number: ${{ github.event.issue.number }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout head branch from PR + if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }} + uses: actions/checkout@v2.2.0 + with: + repository: ${{ fromJSON(steps.pr_info.outputs.data).head.repo.full_name }} + ref: ${{ fromJSON(steps.pr_info.outputs.data).head.ref }} + fetch-depth: 0 + token: ${{ secrets.VOTCA_BOT_TOKEN }} + - name: Create and commit copyright updates + if: ${{ fromJSON(steps.issue_info.outputs.data).pull_request }} + uses: votca/actions/copyright@master + with: + base: ${{ fromJSON(steps.pr_info.outputs.data).base.sha }} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c02ca79987..10ab92511e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,7 +16,7 @@ Version 2021-dev - make scripts always executable in builddir (#533, #550, #556) - rename REGRESSIONTEST\_TOLERANCE to INTEGRATIONTEST\_TOLERANCE (#534) - standardising include order and style in library files (#542) -- move CI to GitHub Ations (#551, #552, #553, #561, #562) +- move CI to GitHub Ations (#551, #552, #553, #561, #562, #593) - format CMake internal cpp code (#557) - update codacy badge (#558) - convert markdown to rst format (#559)