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
1 change: 1 addition & 0 deletions .github/workflows/set-milestone-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
types: [closed]

permissions:
contents: read
issues: write
pull-requests: write

Expand Down
8 changes: 8 additions & 0 deletions scripts/desktop-release-config.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const packagerPackagePath = path.join(packagerPath, 'package.json');
const packagerLockPath = path.join(packagerPath, 'package-lock.json');
const configPath = path.join(root, 'examples/electron/electron-builder.yml');
const workflowPath = path.join(root, '.github/workflows/release-desktop.yml');
const milestoneWorkflowPath = path.join(root, '.github/workflows/set-milestone-on-pr.yml');

test('desktop packaging exposes production and distribution commands', () => {
assert.equal(electronPackage.scripts['build:prod'], 'theiaext build && npm run -s bundle:prod');
Expand Down Expand Up @@ -92,3 +93,10 @@ test('tag builds aggregate artifacts into a draft GitHub release', () => {
assert.match(publish.run, /SHA256SUMS/);
assert.match(publish.run, /unsigned/i);
});

test('milestone workflow can read merged package metadata', () => {
const workflow = yaml.load(fs.readFileSync(milestoneWorkflowPath, 'utf8'));
assert.equal(workflow.permissions.contents, 'read');
assert.equal(workflow.permissions.issues, 'write');
assert.equal(workflow.permissions['pull-requests'], 'write');
});
Loading