Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix labeling for additional file types #8

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ branding:
color: 'gray-dark'

runs:
using: 'node12'
using: 'node16'
main: 'dist/index.js'
16 changes: 8 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21612,27 +21612,27 @@ class FilesModule extends BaseModule {
}
}


if (typeof config === 'string') {
return this.areFilesApplicable(fileObjects, label, [config])
} else if (Array.isArray(config)) {
return this.areFilesApplicable(fileObjects, label, [...config])
} else if (typeof config === 'object') {
FILE_STATUSES.forEach(s => {
if (config.hasOwnProperty(s)) {
if (typeof config[s] === 'string') {
const result = this.areFilesApplicable(fileObjects, label, [config[s]], s)
for (const status of FILE_STATUSES) {
if (config.hasOwnProperty(status)) {
if (typeof config[status] === 'string') {
const result = this.areFilesApplicable(fileObjects, label, [config[status]], status)
if (result) {
return result
}
} else if (Array.isArray(config[s])) {
const result = this.areFilesApplicable(fileObjects, label, [...config[s]], s)
} else if (Array.isArray(config[status])) {
const result = this.areFilesApplicable(fileObjects, label, [...config[status]], status)
if (result) {
return result
}
}
}
})

}
} else {
return undefined
}
Expand Down
Loading