This repository was archived by the owner on Sep 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Copyright
2+ on :
3+ issue_comment :
4+ types : [created]
5+ jobs :
6+ edit :
7+ name : Copyright
8+ if : ${{ github.event.comment.body == '@votca-bot copyright' }}
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Check if message comes from PR
12+ uses : octokit/request-action@v2.x
13+ id : issue_info
14+ with :
15+ route : GET /repos/:repository/issues/:pull_number
16+ repository : ${{ github.repository }}
17+ pull_number : ${{ github.event.issue.number }}
18+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19+ - name : Get PR info
20+ if : ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
21+ uses : octokit/request-action@v2.x
22+ id : pr_info
23+ with :
24+ route : GET /repos/:repository/pulls/:pull_number
25+ repository : ${{ github.repository }}
26+ pull_number : ${{ github.event.issue.number }}
27+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28+ - name : Checkout head branch from PR
29+ if : ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
30+ uses : actions/checkout@v2.2.0
31+ with :
32+ repository : ${{ fromJSON(steps.pr_info.outputs.data).head.repo.full_name }}
33+ ref : ${{ fromJSON(steps.pr_info.outputs.data).head.ref }}
34+ fetch-depth : 0
35+ token : ${{ secrets.VOTCA_BOT_TOKEN }}
36+ - name : Create and commit copyright updates
37+ if : ${{ fromJSON(steps.issue_info.outputs.data).pull_request }}
38+ uses : votca/actions/copyright@master
39+ with :
40+ base : ${{ fromJSON(steps.pr_info.outputs.data).base.sha }}
You can’t perform that action at this time.
0 commit comments