Skip to content

Fix NameError: rename RequestRate to Rate and deprecate Python 3.8/3.9 #89

Fix NameError: rename RequestRate to Rate and deprecate Python 3.8/3.9

Fix NameError: rename RequestRate to Rate and deprecate Python 3.8/3.9 #89

Workflow file for this run

name: Reply to issue comments
on:
issue_comment:
types: [created]
permissions:
issues: write
jobs:
reply:
runs-on: ubuntu-latest
if: contains(github.event.comment.body, '@njzjz-bot')
steps:
- uses: actions/checkout@v6
- name: Extract identifiers
id: extract-identifiers
run: |
echo identifiers=$(echo "${{ github.event.comment.body }}" | grep -oE '@njzjz-bot .*' | head -n1 | cut -c12- | xargs) >> $GITHUB_OUTPUT
- name: Run wenxian
id: wenxian
uses: ./
with:
id: ${{ steps.extract-identifiers.outputs.identifiers }}
- name: Prepare the comment body
id: prepare-comment
run: |
{
echo 'comment<<EOF'
echo '@${{ github.event.comment.user.login }} Here is the BibTeX entry for `${{ steps.extract-identifiers.outputs.identifiers }}`:'
echo '```bibtex'
echo "${OUTPUT_BIBTEX}"
echo '```'
echo EOF
} >> $GITHUB_OUTPUT
env:
OUTPUT_BIBTEX: ${{ steps.wenxian.outputs.bibtex }}
- name: Post comment
run: |
echo "${OUTPUT_COMMENT}" | gh issue comment ${{ github.event.issue.number }} --body-file -
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT_COMMENT: ${{ steps.prepare-comment.outputs.comment }}