[GooglePlayReleaseBundle]Add changesNotSentForReview option (#272)

* Added changesNotSentForReview input

* Corrected description for changesNotSentForReview input

* Added logic for new input in GooglePlay.ts and corrected description

* Bumped task version

* Added explanatory comment for @ts-ignore

* Corrected style code in GooglePlay.ts

* Bumped task version

* Corrected helpMarkDown

* Corrected label

Co-authored-by: Vladislav Ryzhov <v-vryzhov@microsoft.com>
This commit is contained in:
Vladislav Ryzhov 2021-05-20 15:15:28 +03:00 коммит произвёл GitHub
Родитель 54edf77f7c
Коммит 43cd04739b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 29 добавлений и 3 удалений

Просмотреть файл

@ -12,6 +12,7 @@ async function run() {
tl.debug('Prepare task inputs.');
const sendChangesToReview: boolean = tl.getBoolInput('changesNotSentForReview');
const authType: string = tl.getInput('authType', true);
let key: googleutil.ClientKey = {};
if (authType === 'JsonFile') {
@ -135,7 +136,12 @@ async function run() {
tl.debug('Updated track info: ' + JSON.stringify(updatedTrack));
tl.debug('Committing the edit transaction in Google Play.');
await edits.commit();
// Need to use "@ts-ignore" because there is no changesNotSentForReview option
// in this version of googleapis package but it still works as expected.
// It should be available in the next release
// and we will update package version and remove this comment
//@ts-ignore
await edits.commit({ changesNotSentForReview: sendChangesToReview });
console.log(tl.loc('AptPublishSucceed'));
console.log(tl.loc('TrackInfo', track));

Просмотреть файл

@ -40,6 +40,8 @@
"loc.input.help.replaceList": "The comma separated list of APK version codes to be removed from the track with this deployment.",
"loc.input.label.replaceExpression": "Version code pattern",
"loc.input.help.replaceExpression": "The regular expression pattern to select a list of APK version codes to be removed from the track with this deployment, e.g. _.\\*12?(3|4)?5_ ",
"loc.input.label.changesNotSentForReview": "Send changes to review",
"loc.input.help.changesNotSentForReview": "Select this option to send changes for review in GooglePlay Console. If changes're already sent for review automatically, you shouldn't select this option. [More info](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#query-parameters).",
"loc.messages.InvalidAuthFile": "%s is not a valid auth file",
"loc.messages.FoundMainBundle": "Found main bundle to upload: %s (version code %s)",
"loc.messages.FoundDeobfuscationFile": "Found deobfuscation (mapping) file: %s",

Просмотреть файл

@ -14,7 +14,7 @@
],
"version": {
"Major": "3",
"Minor": "187",
"Minor": "188",
"Patch": "0"
},
"minimumAgentVersion": "2.182.1",
@ -218,6 +218,15 @@
"required": true,
"helpMarkDown": "The regular expression pattern to select a list of APK version codes to be removed from the track with this deployment, e.g. _.\\*12?(3|4)?5_ ",
"visibleRule": "versionCodeFilterType = expression"
},
{
"name": "changesNotSentForReview",
"type": "boolean",
"label": "Send changes to review",
"groupName": "advanced",
"defaultValue": false,
"required": false,
"helpMarkDown": "Select this option to send changes for review in GooglePlay Console. If changes're already sent for review automatically, you shouldn't select this option. [More info](https://developers.google.com/android-publisher/api-ref/rest/v3/edits/commit#query-parameters)."
}
],
"execution": {

Просмотреть файл

@ -14,7 +14,7 @@
],
"version": {
"Major": "3",
"Minor": "187",
"Minor": "188",
"Patch": "0"
},
"minimumAgentVersion": "2.182.1",
@ -218,6 +218,15 @@
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.replaceExpression",
"visibleRule": "versionCodeFilterType = expression"
},
{
"name": "changesNotSentForReview",
"type": "boolean",
"label": "ms-resource:loc.input.label.changesNotSentForReview",
"groupName": "advanced",
"defaultValue": false,
"required": false,
"helpMarkDown": "ms-resource:loc.input.help.changesNotSentForReview"
}
],
"execution": {