mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-30 12:05:39 -05:00
fix(autoclose): get the files before counting them (#47898)
This commit is contained in:
committed by
GitHub
parent
023dcd6a25
commit
977911bf84
5
.github/workflows/autoclose.yml
vendored
5
.github/workflows/autoclose.yml
vendored
@@ -14,6 +14,11 @@ jobs:
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
const files = await github.rest.pulls.listFiles({
|
||||
owner: context.payload.repository.owner.login,
|
||||
repo: context.payload.repository.name,
|
||||
pull_number: context.payload.pull_request.number,
|
||||
});
|
||||
if (
|
||||
files.data.length !== 1 ||
|
||||
files.data[0].filename !== ".gitignore"
|
||||
|
||||
Reference in New Issue
Block a user