Compare commits

..

3 Commits

Author SHA1 Message Date
Bruno Borges 4bba7ed9c4 Merge branch 'main' into copilot/disable-interactivemode-settings-xml 2026-06-23 13:40:02 -04:00
copilot-swe-agent[bot] 9a1f2f556b Add interactiveMode false to generated maven settings.xml 2026-06-23 02:06:00 +00:00
copilot-swe-agent[bot] eb4afe2a5b Initial plan 2026-06-23 02:04:03 +00:00
11 changed files with 397 additions and 1169 deletions
-1
View File
@@ -5,6 +5,5 @@ Describe your changes.
Add link to the related issue. Add link to the related issue.
**Check list:** **Check list:**
- [ ] Ran `npm run check` locally (format, lint, build, test) and all checks pass.
- [ ] Mark if documentation changes are required. - [ ] Mark if documentation changes are required.
- [ ] Mark if tests were added or updated to cover the changes. - [ ] Mark if tests were added or updated to cover the changes.
+3 -3
View File
@@ -23,12 +23,12 @@ jobs:
security-events: write # to upload SARIF results to code scanning security-events: write # to upload SARIF results to code scanning
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v7 uses: actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v6 uses: actions/setup-python@v5
with: with:
python-version: '3.x' python-version: '3.x'
@@ -42,7 +42,7 @@ jobs:
- name: Upload SARIF results to code scanning - name: Upload SARIF results to code scanning
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
uses: github/codeql-action/upload-sarif@v4 uses: github/codeql-action/upload-sarif@v3
with: with:
sarif_file: zizmor.sarif sarif_file: zizmor.sarif
category: zizmor category: zizmor
-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged
-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run build && npm test
+2
View File
@@ -160,6 +160,7 @@ describe('auth tests', () => {
const expectedSettings = `<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" const expectedSettings = `<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<interactiveMode>false</interactiveMode>
<servers> <servers>
<server> <server>
<id>${id}</id> <id>${id}</id>
@@ -181,6 +182,7 @@ describe('auth tests', () => {
const expectedSettings = `<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" const expectedSettings = `<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<interactiveMode>false</interactiveMode>
<servers> <servers>
<server> <server>
<id>${id}</id> <id>${id}</id>
+1
View File
@@ -77727,6 +77727,7 @@ function generate(id, username, password, gpgPassphrase) {
'@xmlns': 'http://maven.apache.org/SETTINGS/1.0.0', '@xmlns': 'http://maven.apache.org/SETTINGS/1.0.0',
'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
'@xsi:schemaLocation': 'http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd', '@xsi:schemaLocation': 'http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd',
interactiveMode: false,
servers: { servers: {
server: [ server: [
{ {
+2
View File
@@ -436,6 +436,7 @@ The two `settings.xml` files created from the above example look like the follow
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<interactiveMode>false</interactiveMode>
<servers> <servers>
<server> <server>
<id>github</id> <id>github</id>
@@ -455,6 +456,7 @@ The two `settings.xml` files created from the above example look like the follow
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<interactiveMode>false</interactiveMode>
<servers> <servers>
<server> <server>
<id>maven</id> <id>maven</id>
-11
View File
@@ -63,17 +63,6 @@ Pull requests are the easiest way to contribute changes to git repos at GitHub.
- To lint the code, **you need to run the `lint:fix` script** - To lint the code, **you need to run the `lint:fix` script**
- To transpile source code to `javascript` we use [NCC](https://github.com/vercel/ncc). **It is very important to run the `build` script after making changes**, otherwise your changes will not get into the final `javascript` build - To transpile source code to `javascript` we use [NCC](https://github.com/vercel/ncc). **It is very important to run the `build` script after making changes**, otherwise your changes will not get into the final `javascript` build
> [!TIP]
> Instead of running each script individually, you can run the aggregate scripts:
>
> - `npm run fix` — formats, lints (with autofix) and rebuilds the `dist/` bundle.
> - `npm run check` — runs the same validation as CI: `format-check`, `lint`, `build` and `test`. **Run this before pushing a pull request** to make sure it will pass the required checks.
>
> Git hooks are installed automatically when you run `npm install` (via [husky](https://typicode.github.io/husky/)):
>
> - a **pre-commit** hook formats and lints staged files with [lint-staged](https://github.com/lint-staged/lint-staged);
> - a **pre-push** hook rebuilds `dist/` and runs the test suite.
**Learn more about how to implement tests:** **Learn more about how to implement tests:**
Adding or changing tests is an integral part of making a change to the code. Adding or changing tests is an integral part of making a change to the code.
+386 -1130
View File
File diff suppressed because it is too large Load Diff
+2 -16
View File
@@ -13,22 +13,10 @@
"format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"", "format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"",
"lint": "eslint --config ./.eslintrc.js \"**/*.ts\"", "lint": "eslint --config ./.eslintrc.js \"**/*.ts\"",
"lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix", "lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix",
"check": "npm run format-check && npm run lint && npm run build && npm test",
"fix": "npm run format && npm run lint:fix && npm run build",
"prepare": "husky install",
"prerelease": "npm run-script build", "prerelease": "npm run-script build",
"release": "git add -f dist/setup/index.js dist/cleanup/index.js", "release": "git add -f dist/setup/index.js dist/cleanup/index.js",
"test": "jest" "test": "jest"
}, },
"lint-staged": {
"*.ts": [
"prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write",
"eslint --config ./.eslintrc.js --fix"
],
"*.{yml,yaml}": [
"prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write"
]
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/actions/setup-java.git" "url": "git+https://github.com/actions/setup-java.git"
@@ -56,16 +44,14 @@
"@types/node": "^26.0.0", "@types/node": "^26.0.0",
"@types/semver": "^7.5.8", "@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^8.48.0", "@typescript-eslint/eslint-plugin": "^8.48.0",
"@typescript-eslint/parser": "^8.62.0", "@typescript-eslint/parser": "^8.61.1",
"@vercel/ncc": "^0.44.0", "@vercel/ncc": "^0.44.0",
"eslint": "^10.6.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-jest": "^29.0.1", "eslint-plugin-jest": "^29.0.1",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"husky": "^9.1.7",
"jest": "^30.4.2", "jest": "^30.4.2",
"jest-circus": "^30.4.2", "jest-circus": "^30.4.2",
"lint-staged": "^17.0.8",
"prettier": "^3.6.2", "prettier": "^3.6.2",
"ts-jest": "^29.4.11", "ts-jest": "^29.4.11",
"typescript": "^5.3.3" "typescript": "^5.3.3"
+1
View File
@@ -80,6 +80,7 @@ export function generate(
'@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
'@xsi:schemaLocation': '@xsi:schemaLocation':
'http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd', 'http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd',
interactiveMode: false,
servers: { servers: {
server: [ server: [
{ {