Skip to content

Commit 860052e

Browse files
committed
restore document pr command
1 parent cf10625 commit 860052e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/pr-commands.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,42 @@ jobs:
5656
with:
5757
repo-token: ${{ secrets.GITHUB_TOKEN }}
5858

59+
document:
60+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
61+
name: document
62+
runs-on: ubuntu-latest
63+
env:
64+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- uses: r-lib/actions/pr-fetch@v2
69+
with:
70+
repo-token: ${{ secrets.GITHUB_TOKEN }}
71+
72+
- uses: r-lib/actions/setup-r@v2
73+
with:
74+
use-public-rspm: true
75+
76+
- uses: r-lib/actions/setup-r-dependencies@v2
77+
with:
78+
extra-packages: any::roxygen2
79+
needs: pr-document
80+
81+
- name: Document
82+
run: Rscript -e 'roxygen2::roxygenise()'
83+
84+
- name: commit
85+
run: |
86+
git config --local user.name "$GITHUB_ACTOR"
87+
git config --local user.email "[email protected]"
88+
git add man/\* NAMESPACE
89+
git commit -m 'Document'
90+
91+
- uses: r-lib/actions/pr-push@v2
92+
with:
93+
repo-token: ${{ secrets.GITHUB_TOKEN }}
94+
5995
style:
6096
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }}
6197
name: style

0 commit comments

Comments
 (0)