mirror of
https://github.com/actions/stale.git
synced 2026-01-04 19:40:04 +08:00
Add support to v1 to connect to GHES (#69)
* Bumping actions/github to 2.2.0 for GHES * Husky commit correct node modules
This commit is contained in:
36
node_modules/rsvp/lib/rsvp/then.js
generated
vendored
Normal file
36
node_modules/rsvp/lib/rsvp/then.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import { config } from './config';
|
||||
import instrument from './instrument';
|
||||
import {
|
||||
noop,
|
||||
subscribe,
|
||||
FULFILLED,
|
||||
REJECTED,
|
||||
PENDING,
|
||||
invokeCallback
|
||||
} from './-internal';
|
||||
|
||||
export default function then(onFulfillment, onRejection, label) {
|
||||
let parent = this;
|
||||
let state = parent._state;
|
||||
|
||||
if (state === FULFILLED && !onFulfillment || state === REJECTED && !onRejection) {
|
||||
config.instrument && instrument('chained', parent, parent);
|
||||
return parent;
|
||||
}
|
||||
|
||||
parent._onError = null;
|
||||
|
||||
let child = new parent.constructor(noop, label);
|
||||
let result = parent._result;
|
||||
|
||||
config.instrument && instrument('chained', parent, child);
|
||||
|
||||
if (state === PENDING) {
|
||||
subscribe(parent, child, onFulfillment, onRejection);
|
||||
} else {
|
||||
let callback = state === FULFILLED ? onFulfillment : onRejection;
|
||||
config.async(() => invokeCallback(state, child, callback, result));
|
||||
}
|
||||
|
||||
return child;
|
||||
}
|
||||
Reference in New Issue
Block a user