Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SideCI Demo Pull Request#1

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
MohamedMahmoud212 wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromsideci_demo_1509235577
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletionssideci.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
linter:
rubocop:
root_dir: 'sideci_demo'

phpmd:
root_dir: 'sideci_demo'
options:
rule: 'phpmd.xml'
14 changes: 14 additions & 0 deletionssideci_demo/phpmd.xml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<ruleset name="SideCI demo rule set">
<rule ref="rulesets/cleancode.xml" />
<rule ref="rulesets/controversial.xml">
<exclude name="CamelCaseClassName"></exclude>
<exclude name="CamelCasePropertyName"></exclude>
<exclude name="CamelCaseMethodName"></exclude>
<exclude name="CamelCaseParameterName"></exclude>
<exclude name="CamelCaseVariableName"></exclude>
</rule>
<rule ref="rulesets/design.xml" />
<rule ref="rulesets/naming.xml" />
<rule ref="rulesets/unusedcode.xml" />
</ruleset>
51 changes: 51 additions & 0 deletionssideci_demo/phpmd_demo.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
<?php

use Github\Client;

class Repository
{
private $owner;
private $name;
private $public;
private $branches;

const PublicVisibility = 'public';

/**
* @param string $owner
* @param string $name
* @param string $visibility
*/
public function Repository(string $owner, string $name, string $visibility)
{
$this->owner = $owner;
$this->name = $name;
$this->public = $visibility === PublicVisibility;
$this->client = new Client($_SERVER['API_TOKEN']);
}

/**
* @return string
*/
public function getFullName(): string
{
return $this->owner . $this->name;
}

/**
* @return bool
*/
public function getPublic(): bool
{
return $this->public;
}

/**
* @param string $title
* @param string $description
*/
public function createIssue(string $title, string $description)
{
$this->client->createIssue($this->getFullName, $title, $description);
}
}

[8]ページ先頭

©2009-2025 Movatter.jp