GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — upgrade@14523890459 · probe-lab/github-mgmt@2237241

This repository was archived by the owner on Sep 26, 2025. It is now read-only.

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github
    • dependabot.yml
    • workflows
      • fix.yml
      • plan.yml
  • CHANGELOG.md
  • scripts
    • __tests__
      • __resources__/terraform
        • locals_override.tf
      • github.test.ts
      • github.ts
      • terraform
        • state.test.ts
    • package-lock.json
    • package.json
    • src
      • actions/shared
        • add-collaborator-to-all-repos.ts
      • github.ts
      • sync.ts
      • terraform
        • locals.ts
        • state.ts
  • terraform
    • locals.tf
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/dependabot.yml‎

Copy file name to clipboard
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions" # See documentation for possible values
4+
directory: "/" # Location of package manifests
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "npm"
8+
directory: "/scripts/"
9+
schedule:
10+
interval: "weekly"
Collapse file

‎.github/workflows/fix.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/fix.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
# NOTE(galargh, 2024-02-15): This will only work if GitHub as Code is used for a single organization
118118
- name: Comment on pull request
119119
if: github.event_name == 'pull_request_target' && steps.fix.outputs.comment
120-
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1
120+
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
121121
with:
122122
header: fix
123123
number: ${{ github.event.pull_request.number }}
Collapse file

‎.github/workflows/plan.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/plan.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
echo 'EOF' >> $GITHUB_ENV
158158
working-directory: terraform
159159
- name: Comment on pull request
160-
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1
160+
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
161161
with:
162162
header: plan
163163
number: ${{ github.event.pull_request.number }}
Collapse file

‎CHANGELOG.md‎

Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88
### Added
9+
- shared action for adding a collaborator to all repositories
910
- clean workflow which removes resources from state
1011
- information on how to handle private GitHub Management repository
1112
- warning about GitHub Management repository access
@@ -22,7 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2223
- new args for repositories and branch protection rules
2324

2425
### Changed
25-
- Updated the signatures of all the shared actions; now the runAction function will persist the changes to disk while action functions will operate on the in-memory state
26+
- **BREAKING**: turned scripts into an ESM project (please ensure you remove the following files during the upgrade: `scripts/.eslintignore`, `scripts/.eslintrc.json`, `scripts/jest.config.js`, `jest.d.ts`, `jest.setup.ts`; please update your imports in the `scripts/src/actions/fix-yaml-config.ts` file to include the `.js` extension)
27+
- **BREAKING**: Updated the signatures of all the shared actions; now the runAction function will persist the changes to disk while action functions will operate on the in-memory state (please update your imports in the `scripts/src/actions/fix-yaml-config.ts` file accordingly)
2628
- Synchronization script: to use GitHub API directly instead of relying on TF GH Provider's Data Sources
2729
- Configuration: replaced multiple JSONs with a single, unified YAML
2830
- Synchronization script: rewrote the script in JS
Collapse file

‎scripts/__tests__/__resources__/terraform/locals_override.tf‎

Copy file name to clipboardExpand all lines: scripts/__tests__/__resources__/terraform/locals_override.tf
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ locals {
1010
"github_repository_file",
1111
"github_issue_label"
1212
]
13+
ignore = {
14+
"repositories" = ["ignored"]
15+
"teams" = ["ignored"]
16+
"users" = ["ignored"]
17+
}
1318
}
Collapse file

‎scripts/__tests__/github.test.ts‎

Copy file name to clipboard
+235Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
import 'reflect-metadata'
2+
3+
import {before, describe, it} from 'node:test'
4+
import assert from 'node:assert'
5+
import {mockGitHub} from './github.js'
6+
import {GitHub} from '../src/github.js'
7+
8+
describe('github', () => {
9+
let github: GitHub
10+
11+
before(async () => {
12+
mockGitHub({
13+
invitations: [
14+
{
15+
login: 'ignored'
16+
},
17+
{
18+
login: 'unignored'
19+
}
20+
],
21+
members: [
22+
{
23+
login: 'ignored'
24+
},
25+
{
26+
login: 'unignored'
27+
}
28+
],
29+
repositories: [
30+
{
31+
name: 'ignored',
32+
branchProtectionRules: [
33+
{
34+
pattern: 'ignored'
35+
},
36+
{
37+
pattern: 'unignored'
38+
}
39+
],
40+
collaborators: [
41+
{
42+
login: 'ignored'
43+
},
44+
{
45+
login: 'unignored'
46+
}
47+
],
48+
invitations: [
49+
{
50+
login: 'ignored'
51+
},
52+
{
53+
login: 'unignored'
54+
}
55+
],
56+
labels: [
57+
{
58+
name: 'ignored'
59+
},
60+
{
61+
name: 'unignored'
62+
}
63+
]
64+
},
65+
{
66+
name: 'unignored',
67+
branchProtectionRules: [
68+
{
69+
pattern: 'ignored'
70+
},
71+
{
72+
pattern: 'unignored'
73+
}
74+
],
75+
collaborators: [
76+
{
77+
login: 'ignored'
78+
},
79+
{
80+
login: 'unignored'
81+
}
82+
],
83+
invitations: [
84+
{
85+
login: 'ignored'
86+
},
87+
{
88+
login: 'unignored'
89+
}
90+
],
91+
labels: [
92+
{
93+
name: 'ignored'
94+
},
95+
{
96+
name: 'unignored'
97+
}
98+
]
99+
}
100+
],
101+
teams: [
102+
{
103+
name: 'ignored',
104+
members: [
105+
{
106+
login: 'ignored'
107+
},
108+
{
109+
login: 'unignored'
110+
}
111+
],
112+
invitations: [
113+
{
114+
login: 'ignored'
115+
},
116+
{
117+
login: 'unignored'
118+
}
119+
],
120+
repositories: [
121+
{
122+
name: 'ignored'
123+
},
124+
{
125+
name: 'unignored'
126+
}
127+
]
128+
},
129+
{
130+
name: 'unignored',
131+
members: [
132+
{
133+
login: 'ignored'
134+
},
135+
{
136+
login: 'unignored'
137+
}
138+
],
139+
invitations: [
140+
{
141+
login: 'ignored'
142+
},
143+
{
144+
login: 'unignored'
145+
}
146+
],
147+
repositories: [
148+
{
149+
name: 'ignored'
150+
},
151+
{
152+
name: 'unignored'
153+
}
154+
]
155+
}
156+
]
157+
})
158+
github = await GitHub.getGitHub()
159+
})
160+
161+
it('listInvitations', async () => {
162+
const invitations = await github.listInvitations()
163+
assert.ok(invitations.length > 0)
164+
assert.ok(!invitations.some(i => i.login === 'ignored'))
165+
})
166+
167+
it('listMembers', async () => {
168+
const members = await github.listMembers()
169+
assert.ok(members.length > 0)
170+
assert.ok(!members.some(m => m.user?.login === 'ignored'))
171+
})
172+
173+
it('listRepositories', async () => {
174+
const repositories = await github.listRepositories()
175+
assert.ok(repositories.length > 0)
176+
assert.ok(!repositories.some(r => r.name === 'ignored'))
177+
})
178+
179+
it('listRepositoryBranchProtectionRules', async () => {
180+
const rules = await github.listRepositoryBranchProtectionRules()
181+
assert.ok(rules.length > 0)
182+
assert.ok(!rules.some(r => r.repository.name === 'ignored'))
183+
// NOTE: Ignoring rules by pattern is not supported yet
184+
assert.ok(rules.some(r => r.branchProtectionRule.pattern === 'ignored'))
185+
})
186+
187+
it('listRepositoryCollaborators', async () => {
188+
const collaborators = await github.listRepositoryCollaborators()
189+
assert.ok(collaborators.length > 0)
190+
assert.ok(!collaborators.some(c => c.repository.name === 'ignored'))
191+
assert.ok(!collaborators.some(c => c.collaborator.login === 'ignored'))
192+
})
193+
194+
it('listRepositoryInvitations', async () => {
195+
const invitations = await github.listRepositoryInvitations()
196+
assert.ok(invitations.length > 0)
197+
assert.ok(!invitations.some(i => i.repository.name === 'ignored'))
198+
assert.ok(!invitations.some(i => i.invitee?.login === 'ignored'))
199+
})
200+
201+
it('listRepositoryLabels', async () => {
202+
const labels = await github.listRepositoryLabels()
203+
assert.ok(labels.length > 0)
204+
assert.ok(!labels.some(l => l.repository.name === 'ignored'))
205+
// NOTE: Ignoring labels by name is not supported yet
206+
assert.ok(labels.some(l => l.label.name === 'ignored'))
207+
})
208+
209+
it('listTeams', async () => {
210+
const teams = await github.listTeams()
211+
assert.ok(teams.length > 0)
212+
assert.ok(!teams.some(t => t.name === 'ignored'))
213+
})
214+
215+
it('listTeamInvitations', async () => {
216+
const invitations = await github.listTeamInvitations()
217+
assert.ok(invitations.length > 0)
218+
assert.ok(!invitations.some(i => i.team.name === 'ignored'))
219+
assert.ok(!invitations.some(i => i.invitation.login === 'ignored'))
220+
})
221+
222+
it('listTeamMembers', async () => {
223+
const members = await github.listTeamMembers()
224+
assert.ok(members.length > 0)
225+
assert.ok(!members.some(m => m.team.name === 'ignored'))
226+
assert.ok(!members.some(m => m.member.login === 'ignored'))
227+
})
228+
229+
it('listTeamRepositories', async () => {
230+
const repositories = await github.listTeamRepositories()
231+
assert.ok(repositories.length > 0)
232+
assert.ok(!repositories.some(r => r.team.name === 'ignored'))
233+
assert.ok(!repositories.some(r => r.repository.name === 'ignored'))
234+
})
235+
})

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.