declapract-typescript-ehmpathy 0.48.3 → 0.48.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "devDependencies": {
3
3
  "declastruct": "@declapract{check.minVersion('1.9.1')}",
4
- "declastruct-github": "@declapract{check.minVersion('1.4.0')}"
4
+ "declastruct-github": "@declapract{check.minVersion('1.5.5')}"
5
5
  }
6
6
  }
@@ -5,6 +5,7 @@ import {
5
5
  DeclaredGithubEnvironment,
6
6
  DeclaredGithubRepo,
7
7
  DeclaredGithubRepoConfig,
8
+ DeclaredGithubTeamRepoAccess,
8
9
  getDeclastructGithubProvider,
9
10
  } from 'declastruct-github';
10
11
  import { type DomainEntity, RefByUnique } from 'domain-objects';
@@ -126,6 +127,13 @@ export const getResources = async (): Promise<DomainEntity<any>[]> => {
126
127
  restrictions: null,
127
128
  });
128
129
 
130
+ // grant releasers team access to the repo (required before they can be environment reviewers)
131
+ const teamReleasersAccess = DeclaredGithubTeamRepoAccess.as({
132
+ team: { org: { login: '@declapract{variable.organizationName}' }, slug: 'releasers' },
133
+ repo,
134
+ permission: 'push', // write access needed to deploy
135
+ });
136
+
129
137
  // declare environment for production deployments from main (auto-approved)
130
138
  const envProductionOnMain = DeclaredGithubEnvironment.as({
131
139
  repo,
@@ -151,6 +159,7 @@ export const getResources = async (): Promise<DomainEntity<any>[]> => {
151
159
  repo,
152
160
  repoConfig,
153
161
  branchMainProtection,
162
+ teamReleasersAccess, // must come before environments that reference this team
154
163
  envProductionOnMain,
155
164
  envProductionOnElse,
156
165
  ];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "declapract-typescript-ehmpathy",
3
3
  "author": "ehmpathy",
4
4
  "description": "declapract best practices declarations for typescript",
5
- "version": "0.48.3",
5
+ "version": "0.48.4",
6
6
  "license": "MIT",
7
7
  "main": "src/index.js",
8
8
  "repository": "ehmpathy/declapract-typescript-ehmpathy",