mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
Updated project linter rules and ran it
This commit is contained in:
@@ -5,7 +5,7 @@ import Status from "../status";
|
||||
import {
|
||||
STATUS_FAILURE,
|
||||
STATUS_RUNNING,
|
||||
STATUS_SUCCESS
|
||||
STATUS_SUCCESS,
|
||||
} from "shared/constants/status";
|
||||
|
||||
jest.dontMock("../status");
|
||||
@@ -16,10 +16,10 @@ describe("Status component", () => {
|
||||
const instance = status.instance();
|
||||
|
||||
expect(
|
||||
instance.shouldComponentUpdate({ status: STATUS_FAILURE })
|
||||
instance.shouldComponentUpdate({ status: STATUS_FAILURE }),
|
||||
).toBeFalsy();
|
||||
expect(
|
||||
instance.shouldComponentUpdate({ status: STATUS_SUCCESS })
|
||||
instance.shouldComponentUpdate({ status: STATUS_SUCCESS }),
|
||||
).toBeTruthy();
|
||||
expect(status.hasClass("failure")).toBeTruthy();
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ export default class Avatar extends Component {
|
||||
render() {
|
||||
const image = this.props.image;
|
||||
const style = {
|
||||
backgroundImage: `url(${image})`
|
||||
backgroundImage: `url(${image})`,
|
||||
};
|
||||
return <div className={styles.avatar} style={style} />;
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@ import {
|
||||
DeployIcon,
|
||||
LaunchIcon,
|
||||
MergeIcon,
|
||||
TagIcon
|
||||
TagIcon,
|
||||
} from "shared/components/icons/index";
|
||||
import {
|
||||
EVENT_TAG,
|
||||
EVENT_PULL_REQUEST,
|
||||
EVENT_DEPLOY
|
||||
EVENT_DEPLOY,
|
||||
} from "shared/constants/events";
|
||||
|
||||
import styles from "./build_event.less";
|
||||
@@ -40,13 +40,15 @@ export default class BuildEvent extends Component {
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
{event === EVENT_TAG && refs
|
||||
? trimTagRef(refs)
|
||||
: event === EVENT_PULL_REQUEST && refspec
|
||||
? trimMergeRef(refs)
|
||||
: event === EVENT_DEPLOY && target
|
||||
? target
|
||||
: branch}
|
||||
{event === EVENT_TAG && refs ? (
|
||||
trimTagRef(refs)
|
||||
) : event === EVENT_PULL_REQUEST && refspec ? (
|
||||
trimMergeRef(refs)
|
||||
) : event === EVENT_DEPLOY && target ? (
|
||||
target
|
||||
) : (
|
||||
branch
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<a href={link} target="_blank">
|
||||
|
||||
@@ -41,5 +41,5 @@ export {
|
||||
StarIcon,
|
||||
SyncIcon,
|
||||
TagIcon,
|
||||
TimelapseIcon
|
||||
TimelapseIcon,
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
STATUS_RUNNING,
|
||||
STATUS_SKIPPED,
|
||||
STATUS_STARTED,
|
||||
STATUS_SUCCESS
|
||||
STATUS_SUCCESS,
|
||||
} from "shared/constants/status";
|
||||
import style from "./status.less";
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
CloseIcon,
|
||||
ClockIcon,
|
||||
RefreshIcon,
|
||||
RemoveIcon
|
||||
RemoveIcon,
|
||||
} from "./icons/index";
|
||||
|
||||
const defaultIconSize = 15;
|
||||
|
||||
@@ -19,5 +19,5 @@ export {
|
||||
STATUS_RUNNING,
|
||||
STATUS_SKIPPED,
|
||||
STATUS_SUCCESS,
|
||||
STATUS_STARTED
|
||||
STATUS_STARTED,
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ export function fetchLogs(tree, client, owner, repo, build, proc) {
|
||||
const slug = repositorySlug(owner, repo);
|
||||
const init = {
|
||||
data: [],
|
||||
loading: true
|
||||
loading: true,
|
||||
};
|
||||
|
||||
tree.set(["logs", "data", slug, build, proc], init);
|
||||
|
||||
Reference in New Issue
Block a user