Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/scripts/"
schedule:
interval: "weekly"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- updated upload and download artifacts actions to v4

### Fixed
- always assert state type when creating resources from state
- do not break long file content lines
- source TF_WORKING_DIR from env helper instead of process.env in locals helper
- fixed how terraform state is accessed before it the initial synchronization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ export class RepositoryBranchProtectionRule implements Resource {
) {
const repositoryIndex: string = resource.index.split(':')[0]
const repository = state.values.root_module.resources.find(
r => resource.mode === 'managed' && r.index === repositoryIndex
r =>
r.mode === 'managed' &&
r.type === Repository.StateType &&
r.index === repositoryIndex
)
const required_pull_request_reviews =
resource.values.required_pull_request_reviews?.at(0)
Expand Down
5 changes: 4 additions & 1 deletion scripts/src/resources/repository-team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ export class RepositoryTeam extends String implements Resource {
) {
const teamIndex = resource.index.split(`:`).slice(0, -1).join(`:`)
const team = state.values.root_module.resources.find(
r => resource.mode === 'managed' && r.index === teamIndex
r =>
r.mode === 'managed' &&
r.type === Team.StateType &&
r.index === teamIndex
)
teams.push(
new RepositoryTeam(
Expand Down
6 changes: 5 additions & 1 deletion scripts/src/resources/team-member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ export class TeamMember extends String implements Resource {
) {
const teamIndex = resource.index.split(`:`).slice(0, -1).join(`:`)
const team = state.values.root_module.resources.find(
r => resource.mode === 'managed' && r.index === teamIndex
r =>
r.mode === 'managed' &&
r.type === Team.StateType &&
r.index === teamIndex
)
console.log(teamIndex, team)
members.push(
new TeamMember(
team !== undefined && team.type === Team.StateType
Expand Down