Modified: trunk/Tools/CISupport/ews-build/steps.py (289534 => 289535)
--- trunk/Tools/CISupport/ews-build/steps.py 2022-02-10 15:49:15 UTC (rev 289534)
+++ trunk/Tools/CISupport/ews-build/steps.py 2022-02-10 15:56:20 UTC (rev 289535)
@@ -91,7 +91,7 @@
return '{}/pull/{}'.format(repository_url, pr_number)
@classmethod
- def commit_url(cls, sha, repository_url=None, pr_number=None):
+ def commit_url(cls, sha, repository_url=None):
if not repository_url:
repository_url = '{}{}'.format(GITHUB_URL, GITHUB_PROJECTS[0])
if repository_url not in GitHub.repository_urls():
@@ -98,8 +98,6 @@
return ''
if not sha:
return ''
- if pr_number:
- return '{}/pull/{}/commits/{}'.format(repository_url, pr_number, sha)
return '{}/commit/{}'.format(repository_url, sha)
@classmethod
@@ -330,7 +328,7 @@
display_name = '{} ({})'.format(display_name, github_username)
self.addURL('PR by: {}'.format(display_name), '{}{}'.format(GITHUB_URL, github_username))
if revision:
- self.addURL('Hash: {}'.format(revision[:HASH_LENGTH_TO_DISPLAY]), GitHub.commit_url(revision, repository_url, pr_number))
+ self.addURL('Hash: {}'.format(revision[:HASH_LENGTH_TO_DISPLAY]), GitHub.commit_url(revision, repository_url))
class CheckOutSource(git.Git):
Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (289534 => 289535)
--- trunk/Tools/CISupport/ews-build/steps_unittest.py 2022-02-10 15:49:15 UTC (rev 289534)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py 2022-02-10 15:56:20 UTC (rev 289535)
@@ -46,7 +46,7 @@
CleanBuild, CleanUpGitIndexLock, CleanGitRepo, CleanWorkingDirectory, CompileJSC, CompileJSCWithoutChange,
CompileWebKit, CompileWebKitWithoutChange, ConfigureBuild, ConfigureBuild, Contributors, CreateLocalGITCommit,
DownloadBuiltProduct, DownloadBuiltProductFromMaster, EWS_BUILD_HOSTNAME, ExtractBuiltProduct, ExtractTestResults,
- FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitHub, GitResetHard,
+ FetchBranches, FindModifiedChangeLogs, FindModifiedLayoutTests, GitResetHard,
InstallBuiltProduct, InstallGtkDependencies, InstallWpeDependencies,
KillOldProcesses, PrintConfiguration, PushCommitToWebKitRepo, ReRunAPITests, ReRunWebKitPerlTests,
ReRunWebKitTests, RevertPullRequestChanges, RunAPITests, RunAPITestsWithoutPatch, RunBindingsTests, RunBuildWebKitOrgUnitTests,
@@ -214,50 +214,6 @@
return behavior
-class TestGitHub(unittest.TestCase):
- def test_pr_url(self):
- self.assertEqual(
- GitHub.pr_url(1234),
- 'https://github.com/WebKit/WebKit/pull/1234',
- )
-
- def test_pr_url_with_repository(self):
- self.assertEqual(
- GitHub.pr_url(1234, 'https://github.com/WebKit/WebKit'),
- 'https://github.com/WebKit/WebKit/pull/1234',
- )
-
- def test_pr_url_with_invalid_repository(self):
- self.assertEqual(
- GitHub.pr_url(1234, 'https://github.example.com/WebKit/WebKit'),
- '',
- )
-
- def test_commit_url(self):
- self.assertEqual(
- GitHub.commit_url('936e3f7cab4a826519121a75bf4481fe56e727e2'),
- 'https://github.com/WebKit/WebKit/commit/936e3f7cab4a826519121a75bf4481fe56e727e2',
- )
-
- def test_commit_url_with_repository(self):
- self.assertEqual(
- GitHub.commit_url('936e3f7cab4a826519121a75bf4481fe56e727e2', 'https://github.com/WebKit/WebKit'),
- 'https://github.com/WebKit/WebKit/commit/936e3f7cab4a826519121a75bf4481fe56e727e2',
- )
-
- def test_commit_url_with_invalid_repository(self):
- self.assertEqual(
- GitHub.commit_url('936e3f7cab4a826519121a75bf4481fe56e727e2', 'https://github.example.com/WebKit/WebKit'),
- '',
- )
-
- def test_pr_commit_url(self):
- self.assertEqual(
- GitHub.commit_url('936e3f7cab4a826519121a75bf4481fe56e727e2', pr_number=1234),
- 'https://github.com/WebKit/WebKit/pull/1234/commits/936e3f7cab4a826519121a75bf4481fe56e727e2',
- )
-
-
class TestStepNameShouldBeValidIdentifier(BuildStepMixinAdditions, unittest.TestCase):
def test_step_names_are_valid(self):
import steps