Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/350.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Github graphQL查询在Github操作中仅获取单个repo_Python_Github_Graphql_Continuous Integration_Github Actions - Fatal编程技术网

Python Github graphQL查询在Github操作中仅获取单个repo

Python Github graphQL查询在Github操作中仅获取单个repo,python,github,graphql,continuous-integration,github-actions,Python,Github,Graphql,Continuous Integration,Github Actions,我试图通过github GraphQLAPI从我自己的github配置文件中获取最后4个回购。 以下是实际查询: { viewer { repositories(last: 4, privacy: PUBLIC) { nodes { name url updatedAt description } } } } 正如你所看到的,它非常简单。当我在本地尝试时,它会获取我的最后4次回购。然

我试图通过github GraphQLAPI从我自己的github配置文件中获取最后4个回购。 以下是实际查询:

{
  viewer {
    repositories(last: 4, privacy: PUBLIC) {
      nodes {
        name
        url
        updatedAt
        description
      }
    }
  }
}
正如你所看到的,它非常简单。当我在本地尝试时,它会获取我的最后4次回购。然而,当它执行github操作时,它只获取一个回购。我试着打印build_readme.py文件中的查询内容,看看它是否是脚本本身,但不,它也以这种方式打印了一个repo

我意识到它可能仍然在我的管道中,所以这里是我的yaml文件(requirements.txt仅包含以下内容:python graphql client==0.4.3):

name: Build README

on: 
  push:
  workflow_dispatch:
  schedule:
    - cron:  '0 */12 * * *'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Check out repo
      uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'
    - name: Configure pip caching
      uses: actions/cache@v2
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-
    - name: Install dependencies
      run: |
        python -m pip install -r requirements.txt
    - name: Build README.md
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |-
        python build_readme.py
        cat README.md
    - name: Commit and push if README changed
      run: |-
        git diff
        git config --global user.email "actions@users.noreply.github.com"
        git config --global user.name "Automated"
        git diff --quiet || (git add README.md && git commit -m "Updated README")
        git push