You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add GitHub token for private rspec repository access in update-rule-metadata
The rspec repository is now private, requiring authentication. This adds
a GitHub token from vault and passes it as GITHUB_TOKEN env variable to
the rule-api execution step.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: update-rule-metadata/README.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The action performs the following operations:
14
14
## Dependencies
15
15
16
16
This action depends on:
17
-
-[SonarSource/vault-action-wrapper](https://github.com/SonarSource/vault-action-wrapper) for retrieving Artifactory credentials
17
+
-[SonarSource/vault-action-wrapper](https://github.com/SonarSource/vault-action-wrapper) for retrieving Artifactory credentials and GitHub token
18
18
- Java 17 runtime for executing the rule-api JAR
19
19
- Git for detecting changes and creating pull requests
20
20
-[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) for automated PR creation
@@ -105,6 +105,7 @@ jobs:
105
105
106
106
The action uses a bash script that:
107
107
- Authenticates with Artifactory using credentials from HashiCorp Vault
108
+
- Retrieves a GitHub token from Vault for accessing the private rspec repository
108
109
- Downloads and caches the specified rule-api JAR version
109
110
- Automatically discovers all directories containing sonarpedia.json files (unless specific files are provided)
110
111
- Changes into each directory and runs the rule-api update command
@@ -113,8 +114,11 @@ The action uses a bash script that:
113
114
114
115
## Prerequisites
115
116
116
-
The action requires that the repository has the `development/artifactory/token/{REPO_OWNER_NAME_DASH}-private-reader` token configured in vault.
117
-
This can be done using the SPEED self-service portal ([more info](https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/3553787989/Manage+Vault+Policy+-+SPEED)).
117
+
The action requires the following tokens configured in vault:
118
+
- `development/artifactory/token/{REPO_OWNER_NAME_DASH}-private-reader` for downloading the rule-api JAR from Artifactory
119
+
- `development/github/token/{REPO_OWNER_NAME_DASH}-its`for authenticating with the private rspec repository
120
+
121
+
These can be configured using the SPEED self-service portal ([more info](https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/3553787989/Manage+Vault+Policy+-+SPEED)).
118
122
119
123
The repository must have:
120
124
- Proper sonarpedia.json files in language-specific directories
@@ -123,7 +127,7 @@ The repository must have:
123
127
124
128
## Notes
125
129
126
-
- This action requires access to SonarSource's HashiCorp Vault for Artifactory credentials
130
+
- This action requires access to SonarSource's HashiCorp Vault for Artifactory credentials and a GitHub token for the private rspec repository
127
131
- The action automatically discovers all sonarpedia.json files unless specific files are provided
128
132
- Pull requests are created with the label `skip-qa` and target the specified branch (defaults to `master`)
129
133
- The rule-api JAR is cached to improve performance on subsequent runs
0 commit comments