Skip to content

Commit

Permalink
Update paper-checks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanxu committed Feb 29, 2024
1 parent 135bf7b commit fd7e532
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions .github/workflows/paper-checks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Paper checks
name: Repository and paper info
on:
workflow_dispatch:
inputs:
Expand All @@ -12,35 +12,16 @@ on:
issue_id:
description: 'The issue number of the submission to post the results'
required: true
wordcount:
description: 'Count the number of words in the paper file'
required: false
default: true
statement_of_need:
description: 'Look for an Statement Of Need section in the paper content'
required: false
default: true
env:
GITHUB_TOKEN: ${{ secrets.PDF_BOT_TOKEN }}
GH_REPO: ${{ github.repository }}
jobs:
run-analysis:
runs-on: ubuntu-latest
steps:
- name: Clone repository
run: |
[[ "${{ github.event.inputs.branch }}" == "" ]] && (git clone --single-branch ${{ github.event.inputs.repository_url }} . ) || (git clone --single-branch --branch ${{ github.event.inputs.branch }} ${{ github.event.inputs.repository_url }} .)
- name: install CLOC
run: sudo apt install cloc
- name: run CLOC
run: |
cloc --quiet --report-file=cloc-results.txt ${{ github.workspace }}
echo -e "**Software report:**\n\n\`\`\`\n$(cat cloc-results.txt)\n\`\`\`" > cloc-results.txt
- name: List Git Authors
run: |
(git shortlog -sn --no-merges --branches .) > git-authors.txt
echo -e "**Commit count by author**:\n\n\`\`\`\n$(cat git-authors.txt)\n\`\`\`" > git-authors.txt
- name: Post results
run: |
echo -e "$(cat cloc-results.txt)\n\n$(cat git-authors.txt)\n" > code-stats.txt
gh issue comment ${{ github.event.inputs.issue_id }} --body-file code-stats.txt
- name: Repository and paper analysis
uses: openjournals/gh-action-repo-checks@main
with:
repository_url: ${{ github.event.inputs.repository_url }}
branch: ${{ github.event.inputs.branch }}
issue_id: ${{ github.event.inputs.issue_id }}

0 comments on commit fd7e532

Please sign in to comment.