@@ -58,11 +58,11 @@ final maxAssetContentLength = 256 * 1024;
5858final _defaultMaxVersionsPerPackage = 1000 ;
5959
6060final Logger _logger = Logger ('pub.cloud_repository' );
61- final _validGithubUserOrRepoRegExp =
61+ final _validGitHubUserOrRepoRegExp =
6262 RegExp (r'^[a-z0-9\-\._]+$' , caseSensitive: false );
63- final _validGithubVersionPattern =
63+ final _validGitHubVersionPattern =
6464 RegExp (r'^[a-z0-9\-._]+$' , caseSensitive: false );
65- final _validGithubEnvironment =
65+ final _validGitHubEnvironment =
6666 RegExp (r'^[a-z0-9\-\._]+$' , caseSensitive: false );
6767
6868/// Sets the package backend service.
@@ -546,8 +546,8 @@ class PackageBackend {
546546 InvalidInputException .check (parts.length == 2 ,
547547 'The `repository` field must follow the `<owner>/<repository>` pattern.' );
548548 InvalidInputException .check (
549- _validGithubUserOrRepoRegExp .hasMatch (parts[0 ]) &&
550- _validGithubUserOrRepoRegExp .hasMatch (parts[1 ]),
549+ _validGitHubUserOrRepoRegExp .hasMatch (parts[0 ]) &&
550+ _validGitHubUserOrRepoRegExp .hasMatch (parts[1 ]),
551551 'The `repository` field has invalid characters.' );
552552 }
553553
@@ -557,7 +557,7 @@ class PackageBackend {
557557 InvalidInputException .check (
558558 tagPatternParts
559559 .where ((e) => e.isNotEmpty)
560- .every (_validGithubVersionPattern .hasMatch),
560+ .every (_validGitHubVersionPattern .hasMatch),
561561 'The `tagPattern` field has invalid characters.' );
562562
563563 InvalidInputException .check (
@@ -566,7 +566,7 @@ class PackageBackend {
566566
567567 if (environment.isNotEmpty) {
568568 InvalidInputException .check (
569- _validGithubEnvironment .hasMatch (environment),
569+ _validGitHubEnvironment .hasMatch (environment),
570570 'The `environment` field has invalid characters.' );
571571 }
572572 }
@@ -1308,8 +1308,8 @@ class PackageBackend {
13081308 await packageBackend.isPackageAdmin (package, agent.user.userId)) {
13091309 return ;
13101310 }
1311- if (agent is AuthenticatedGithubAction ) {
1312- await _checkGithubActionAllowed (agent, package, newVersion);
1311+ if (agent is AuthenticatedGitHubAction ) {
1312+ await _checkGitHubActionAllowed (agent, package, newVersion);
13131313 return ;
13141314 }
13151315 if (agent is AuthenticatedGcpServiceAccount ) {
@@ -1323,7 +1323,7 @@ class PackageBackend {
13231323 agent.displayId, package.name! );
13241324 }
13251325
1326- Future <void > _checkGithubActionAllowed ( AuthenticatedGithubAction agent,
1326+ Future <void > _checkGitHubActionAllowed ( AuthenticatedGitHubAction agent,
13271327 Package package, String newVersion) async {
13281328 final githubConfig = package.automatedPublishing? .githubConfig;
13291329 final githubLock = package.automatedPublishing? .githubLock;
@@ -1676,15 +1676,15 @@ class PackageBackend {
16761676 Package package, AuthenticatedAgent agent) {
16771677 final current = package.automatedPublishing;
16781678 if (current == null ) {
1679- if (agent is AuthenticatedGithubAction ||
1679+ if (agent is AuthenticatedGitHubAction ||
16801680 agent is AuthenticatedGcpServiceAccount ) {
16811681 // This should be unreachable
16821682 throw AssertionError ('Authentication should never have been possible' );
16831683 }
16841684 return ;
16851685 }
1686- if (agent is AuthenticatedGithubAction && current.githubLock == null ) {
1687- current.githubLock = GithubPublishingLock (
1686+ if (agent is AuthenticatedGitHubAction && current.githubLock == null ) {
1687+ current.githubLock = GitHubPublishingLock (
16881688 repositoryOwnerId: agent.payload.repositoryOwnerId,
16891689 repositoryId: agent.payload.repositoryId,
16901690 );
0 commit comments