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

build: payload github status #4549

Merged
merged 2 commits into from
Jun 9, 2017

Conversation

devversion
Copy link
Member

  • Show payload deta on PRs using the Github Statuses API.

@devversion devversion added the in progress This issue is currently in progress label May 14, 2017
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 14, 2017
@devversion devversion force-pushed the build/payload-github-status branch 3 times, most recently from 24f74d6 to d5bc7e9 Compare May 14, 2017 16:59
@devversion devversion added blocked and removed in progress This issue is currently in progress labels May 15, 2017
@devversion
Copy link
Member Author

Now since we can also build HTTP API's using Firebase we can use that for the payload status.

Those functions can will be used for the team dashboard too.

@devversion devversion force-pushed the build/payload-github-status branch 2 times, most recently from 753995d to 7a4556e Compare June 4, 2017 11:03
@devversion devversion requested a review from jelbourn June 4, 2017 11:10
@devversion
Copy link
Member Author

@jelbourn Reworked this to use the Firebase function now. Once we fully switched to the new firebase instance and the remote config is set up we can just replace the function URL in a follow-up PR and proceed.

@jelbourn
Copy link
Member

jelbourn commented Jun 5, 2017

@devversion needs rebase now

@devversion devversion force-pushed the build/payload-github-status branch 2 times, most recently from abe892e to ebe1bf3 Compare June 5, 2017 20:07
@devversion
Copy link
Member Author

@jelbourn Rebased.

@@ -6,18 +6,26 @@ const cloudStorage = require('@google-cloud/storage');
const screenshotFirebaseConfig = require('../../screenshot-test/functions/config.json');

/** Opens a connection to the Firebase dashboard app. */
export function openFirebaseDashboardApp() {
export function openFirebaseDashboardApp(asGuest = false) {
const databaseURL = 'https://material2-board.firebaseio.com';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

databaseUrl

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only did it like that because the firebase-admin also uses it like that and so I can just pass it like that. But can change it.

// a guest works fine. For example in Pull Requests the payload task just wants to read data.
if (asGuest) {
return firebase.initializeApp({ databaseURL });
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just make this a different function: openFirebaseDashboardAppAsGuest

(same thing about flag arguments https://martinfowler.com/bliki/FlagArgument.html)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I'm fine doing this.

// In some situations the service account credentials are not available and authorizing as
// a guest works fine. For example in Pull Requests the payload task just wants to read data.
if (asGuest) {
return firebase.initializeApp({ databaseURL });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason not to always authenticate as guest for diffs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For master builds we need to upload data using firebase-admin.

@devversion devversion force-pushed the build/payload-github-status branch 3 times, most recently from ec5f73e to ecbfd97 Compare June 8, 2017 10:34
@devversion
Copy link
Member Author

@jelbourn Addressed your feedback.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jun 8, 2017
@andrewseguin
Copy link
Contributor

Needs rebase

@andrewseguin andrewseguin added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Jun 8, 2017
@devversion devversion force-pushed the build/payload-github-status branch from ecbfd97 to d7b618b Compare June 8, 2017 18:33
* Show payload deta on PRs using the Github Statuses API.
@devversion devversion force-pushed the build/payload-github-status branch from 5252ede to 25fe80a Compare June 8, 2017 21:52
@devversion
Copy link
Member Author

@andrewseguin Rebased.

@devversion devversion added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Jun 8, 2017
@andrewseguin andrewseguin merged commit c2816ef into angular:master Jun 9, 2017
@devversion devversion deleted the build/payload-github-status branch November 11, 2017 10:23
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants