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

Add environment_url to deployment status events #1010

Conversation

@indiebrain
Copy link
Contributor

indiebrain commented Jan 31, 2020

When creating a deployment status let's add the environment_url to
the payload we send to GitHub. The idea is that this gets us whatever
awesome features with which the GitHub API uses this value - automatic
linking to the deployment environment in the PR.

References

When creating a deployment status let's add the `environment_url` to
the payload we send to GitHub. The idea is that this gets us whatever
awesome features with which the GitHub API uses this value - automatic
linking to the deployment environment in the PR.

References
----------

- https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements/#link-to-a-live-deployment
Copy link
Contributor

casperisfine left a comment

LGTM.

@DazWorrall WDYT?

Copy link
Member

DazWorrall left a comment

I'm fine with this but we need a new accept header in order for it to work, at least according to the docs. Were you able to try this against GitHub locally?

@@ -50,6 +50,7 @@ def create_status_on_github(client)
accept: 'application/vnd.github.flash-preview+json',

This comment has been minimized.

Copy link
@DazWorrall

DazWorrall Feb 3, 2020

Member

We will need to add application/vnd.github.ant-man-preview+json here as per the docs.

This comment has been minimized.

Copy link
@indiebrain

indiebrain Feb 3, 2020

Author Contributor

FWIW, the application/vnd.github.flash-preview+json is a more recent "API Preview" media type than application/vnd.github.ant-man-preview+json. In practice, the environment_url is available with the application/vnd.github.flash-preview+json

Screen_Shot_2020-02-03_at_8_35_39_AM

Copy link
Member

DazWorrall left a comment

If it works then great 👍 wouldn't be the first time the docs weren't quite right!

@casperisfine casperisfine merged commit 1115fa9 into Shopify:master Feb 3, 2020
9 checks passed
9 checks passed
Lint Ruby
Details
Tests with Postgres (2.5.x)
Details
Tests with Postgres (2.6.x)
Details
Tests with MySQL (2.5.x)
Details
Tests with MySQL (2.6.x)
Details
Tests with SQLite3 (2.5.x)
Details
Tests with SQLite3 (2.6.x)
Details
CLA Contributor License Agreement (CLA) status
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@shopify-shipit shopify-shipit bot deployed to rubygems Feb 3, 2020 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.