npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-cli-deploy-github-deployment-status

v1.1.0

Published

An EmberCLI Deploy plugin to update the deployment status of a commit

Downloads

226

Readme

ember-cli-deploy-github-deployment-status

An ember-cli-deploy plugin to update a commit's deployment status on GitHub

This plugin uses the GitHub Repository Deployments API to update the deployment status of a commit. This deployment status will appear in Pull Requests that contain the commit.

ember-cli-deploy-github-deployment-status

What is an ember-cli-deploy plugin?

A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks.

For more information on what plugins are and how they work, please refer to the Plugin Documentation.

Quick Start

To get up and running quickly, do the following:

  • Install this plugin
$ ember install ember-cli-deploy-github-deployment-status
  • Place the following configuration into config/deploy.js
ENV['github-deployment-status'] = {
  org: '<github-org>',
  repo: '<github-repo>',
  ref: '<commit-ish-ref>'
}
  • Run the pipeline
$ ember deploy production

Why would I use this plugin?

You would use this plugin if you would like to add information about the deployment of your application to your Pull Requests. This plugin will allow you to add a preview link to a deployed revision of your application in to the timeline of the Pull Request so anyone reviewing the PR can easily get to the deployed version of code.

What does it actually do?

Ths plugin uses the Github Repository Deployments API to create a deployment for a commit and to update it's status based on the success or failure of your deployment.

This plugin first implements the willDeploy hook where it will create a new deployment for the commit ref specified. This will add a new entry to the PR with a status of pending.

Then, if the deployment is successful, in the didDeploy hook, it will update the deployment status to success. If you provide at target_url, then a link will also be added to the status.

If, however, the deployment fails and the didFail hook is fired, the deployment status will be updated to failed.

Installation

Run the following command in your terminal:

ember install ember-cli-deploy-github-deployment-status

ember-cli-deploy hooks implemented

For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.

  • configure
  • setup
  • willDeploy
  • didDeploy
  • didFail

Configuration Options

For detailed information on how configuration of plugins works, please refer to the Plugin Documentation.

org (required)

The GitHub org that hosts the repo in which you'd like to update the deployment status.

repo (required)

The GitHub repo in which you'd like to update the deployment status

ref (required)

The commit-ish ref that is being deployed. This can be a branch, tag or SHA. See the GitHub docs for more info.

token

An access token that has access to read and modify deplyoment statuses. This is only needed if the repo is "private". The access token must have either the repo or repo_dpeloyment scopes enabled.

Default: null

deploymentId

The ID of a github deployment that has been created outside of ember-cli-deploy. You might use this if you have some other system that has created the the deployment and kicked off ember-cli-deploy and you merely want this plugin to update the deployment status.

If this property does not exist, this plugin will create the deployment as well.

Default: null

targetUrl

The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. See the GitHub docs for more info.

Default: null

task

Optional parameter to specify a task to execute. See the GitHub docs for more info.

Default: deploy

autoMerge

Optional parameter to merge the default branch into the requested ref if it is behind the default branch. See the GitHub docs for more info.

Default: false

requiredContexts

Optional array of status contexts verified against commit status checks. If this parameter is omitted from the parameters then all unique contexts will be verified before a deployment is created. To bypass checking entirely pass an empty array. See the GitHub docs for more info.

Default: []

payload

Optional JSON payload with extra information about the deployment. See the GitHub docs for more info.

Default: null

environment

Optional name for the target deployment environment (e.g., production, staging, qa). See the GitHub docs for more info.

Default: 'production'

Prerequisites

This plugin has no prerequisites.

Running Tests

  • npm test