Skip to content

Commit ae3ca79

Browse files
authored
Improve live URLs, fix some bugs, improve readability (#69)
* Add support for user repository variables for AWS_AMPLIFY_URI and AWS_STORYBOOK_AMPLIFY_URI * Improve error message when ticket might not be in the Current Sprint board * Improve readability of Amplify live URLs
1 parent de867eb commit ae3ca79

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ The MS robot will automatically create a PR on your repository.
1515
## Enable AWS Amplify custom domain
1616

1717
If your repository is linked to AWS Amplify, you can dynamically update the
18-
Amplify hostname link. To do so, create a secret in your repository named
18+
Amplify hostname link. To do so, create a variable in your repository named
1919
`AWS_AMPLIFY_URI` with a value such as `https://pr-%.foo.live.mobsuccess.com`.
2020

21+
Note for legacy users: you can also setup a secret using the same name, albeit
22+
the secret is less convenient because you can't easily edit its current value.
23+
2124
If your repository supports multiple domains, this value can be a JSON:
2225

2326
```json

action.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ exports.action = async function action() {
362362
try {
363363
return await actionImpl();
364364
} catch (error) {
365-
console.error(error);
365+
console.error(
366+
"Caught error while running action, is the Asana ticket in the Current Sprint board?"
367+
);
368+
console.error(error, JSON.stringify(error.value));
366369
core.setFailed(error.message);
367370
throw error;
368371
}
@@ -419,7 +422,7 @@ async function actionImpl() {
419422
custom_fields: {
420423
...(amplifyLiveUrls.length
421424
? {
422-
[customFieldLive.gid]: amplifyLiveUrls.join(" "),
425+
[customFieldLive.gid]: amplifyLiveUrls.join("\n"),
423426
}
424427
: {}),
425428
...(storybookAmplifyUri

sample/workflows/asana.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ jobs:
3434
asana-pat: ${{ secrets.ASANA_PAT }}
3535
github-token: ${{ github.token }}
3636
action: "synchronize"
37-
amplify-uri: ${{ secrets.AWS_AMPLIFY_URI }}
38-
storybook-amplify-uri: ${{ secrets.AWS_STORYBOOK_AMPLIFY_URI }}
37+
amplify-uri: ${{ secrets.AWS_AMPLIFY_URI }}${{ vars.AWS_AMPLIFY_URI }}
38+
storybook-amplify-uri: ${{ secrets.AWS_STORYBOOK_AMPLIFY_URI }}${{ vars.AWS_STORYBOOK_AMPLIFY_URI }}

0 commit comments

Comments
 (0)