@jamesives/github-sponsors-readme-action
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -78,3 +78,4 @@ import {setFailed} from '@actions/core' | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -101,3 +102,4 @@ | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -120,3 +122,4 @@ | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -123,0 +126,0 @@ |
@@ -67,3 +67,4 @@ import {GitHubResponse, PrivacyLevel, Status, Urls} from '../src/constants' | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -127,3 +128,4 @@ | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -187,3 +189,4 @@ | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -247,3 +250,4 @@ | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -307,3 +311,4 @@ | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -367,3 +372,4 @@ | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -427,3 +433,4 @@ | ||
organization: false, | ||
fallback: 'There are no sponsors in this tier' | ||
fallback: 'There are no sponsors in this tier', | ||
activeOnly: true | ||
} | ||
@@ -487,3 +494,4 @@ | ||
organization: false, | ||
fallback: 'There are no sponsors in this tier' | ||
fallback: 'There are no sponsors in this tier', | ||
activeOnly: true | ||
} | ||
@@ -551,3 +559,4 @@ | ||
organization: false, | ||
fallback: 'There are no sponsors in this tier' | ||
fallback: 'There are no sponsors in this tier', | ||
activeOnly: true | ||
} | ||
@@ -619,3 +628,4 @@ | ||
organization: false, | ||
fallback: 'There are no sponsors in this tier' | ||
fallback: 'There are no sponsors in this tier', | ||
activeOnly: true | ||
} | ||
@@ -644,3 +654,4 @@ | ||
organization: false, | ||
fallback: 'There are no sponsors in this tier' | ||
fallback: 'There are no sponsors in this tier', | ||
activeOnly: true | ||
} | ||
@@ -667,3 +678,4 @@ | ||
organization: true, | ||
fallback: 'There are no sponsors in this tier' | ||
fallback: 'There are no sponsors in this tier', | ||
activeOnly: true | ||
} | ||
@@ -694,3 +706,4 @@ | ||
organization: true, | ||
fallback: 'There are no sponsors in this tier' | ||
fallback: 'There are no sponsors in this tier', | ||
activeOnly: true | ||
} | ||
@@ -697,0 +710,0 @@ |
@@ -40,3 +40,4 @@ import { | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -62,3 +63,4 @@ | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -81,3 +83,4 @@ | ||
organization: false, | ||
fallback: '' | ||
fallback: '', | ||
activeOnly: true | ||
} | ||
@@ -84,0 +87,0 @@ |
@@ -21,2 +21,4 @@ /** | ||
organization: boolean; | ||
/** Determines if inactive sponsors should be returned or not. */ | ||
activeOnly: boolean; | ||
} | ||
@@ -35,2 +37,3 @@ /** | ||
organization: boolean; | ||
activeOnly: boolean; | ||
}; | ||
@@ -79,3 +82,3 @@ /** | ||
*/ | ||
export declare type RequiredActionParameters = Pick<ActionInterface, 'token'>; | ||
export type RequiredActionParameters = Pick<ActionInterface, 'token'>; | ||
/** | ||
@@ -82,0 +85,0 @@ * Privacy levels for the sponsorship. |
@@ -29,2 +29,5 @@ "use strict"; | ||
? (0, core_1.getInput)('organization').toLowerCase() === 'true' | ||
: false, | ||
activeOnly: !(0, util_1.isNullOrUndefined)((0, core_1.getInput)('active-only')) | ||
? (0, core_1.getInput)('active-only').toLowerCase() === 'true' | ||
: false | ||
@@ -31,0 +34,0 @@ }; |
@@ -31,3 +31,3 @@ "use strict"; | ||
login | ||
sponsorshipsAsMaintainer(first: 100, orderBy: {field: CREATED_AT, direction: ASC}, includePrivate: true) { | ||
sponsorshipsAsMaintainer(first: 100, orderBy: {field: CREATED_AT, direction: ASC}, includePrivate: true, activeOnly: ${action.activeOnly}) { | ||
totalCount | ||
@@ -34,0 +34,0 @@ pageInfo { |
@@ -5,3 +5,3 @@ { | ||
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"license": "MIT", | ||
@@ -39,3 +39,3 @@ "main": "lib/lib.js", | ||
"@actions/io": "1.1.3", | ||
"cross-fetch": "3.1.6", | ||
"cross-fetch": "4.0.0", | ||
"mustache": "4.2.0" | ||
@@ -51,4 +51,4 @@ }, | ||
"eslint": "8.54.0", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-plugin-jest": "27.4.2", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-jest": "27.6.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
@@ -60,4 +60,4 @@ "jest": "27.5.1", | ||
"ts-jest": "27.1.4", | ||
"typescript": "4.8.4" | ||
"typescript": "4.9.5" | ||
} | ||
} |
@@ -48,3 +48,3 @@ <p align="center"> | ||
> **Note** | ||
> [!IMPORTANT] | ||
> You'll need to provide the action with a **Personal Access Token (PAT)** scoped to `read:user` and `read:org`. This action only applies the template within the workspace. You will need to combine it with a deployment action in order to commit it to your project. You can see a full example of this below. | ||
@@ -137,2 +137,3 @@ | ||
| `template` | Allows you to modify the default template. Please refer to the `template` section of this README for more information. | `with` | **No** | | ||
| `active-only` | If set to `false`, inactive sponsors will be displayed. This can be useful if you want to display all sponsors, regardless of their status. By default this is set to `true`. | `with` | **No** | | ||
@@ -139,0 +140,0 @@ #### Deployment Status |
@@ -24,2 +24,4 @@ import {getInput} from '@actions/core' | ||
organization: boolean | ||
/** Determines if inactive sponsors should be returned or not. */ | ||
activeOnly: boolean | ||
} | ||
@@ -50,2 +52,5 @@ | ||
? getInput('organization').toLowerCase() === 'true' | ||
: false, | ||
activeOnly: !isNullOrUndefined(getInput('active-only')) | ||
? getInput('active-only').toLowerCase() === 'true' | ||
: false | ||
@@ -52,0 +57,0 @@ } |
@@ -35,3 +35,5 @@ import 'cross-fetch/polyfill' | ||
login | ||
sponsorshipsAsMaintainer(first: 100, orderBy: {field: CREATED_AT, direction: ASC}, includePrivate: true) { | ||
sponsorshipsAsMaintainer(first: 100, orderBy: {field: CREATED_AT, direction: ASC}, includePrivate: true, activeOnly: ${ | ||
action.activeOnly | ||
}) { | ||
totalCount | ||
@@ -38,0 +40,0 @@ pageInfo { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
204086
1874
273
+ Addedcross-fetch@4.0.0(transitive)
- Removedcross-fetch@3.1.6(transitive)
Updatedcross-fetch@4.0.0