From 37d653514b590814c97bcb2191859bc025755af5 Mon Sep 17 00:00:00 2001
From: Liam Newman
+ * GitHub Apps must use a JWT to access this endpoint.
+ *
+ * OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
+ *
+ * @return a GHMarketplaceAccountPlan instance
+ * @throws IOException
+ * @see Get
+ * a subscription plan for an account
+ */
+ public GHMarketplaceAccountPlan getMarketplaceAccount() throws IOException {
+ return new GHMarketplacePlanForAccountBuilder(root(), account.getId()).createRequest();
+ }
}
diff --git a/src/main/java/org/kohsuke/github/GHMarketplaceAccount.java b/src/main/java/org/kohsuke/github/GHMarketplaceAccount.java
index ddc28ad1df..1b2a4bf4ea 100644
--- a/src/main/java/org/kohsuke/github/GHMarketplaceAccount.java
+++ b/src/main/java/org/kohsuke/github/GHMarketplaceAccount.java
@@ -72,4 +72,27 @@ public GHMarketplaceAccountType getType() {
return type;
}
+ /**
+ * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub
+ * App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will
+ * also see the upcoming pending change.
+ *
+ *
+ * You use the returned builder to set various properties, then call
+ * {@link GHMarketplacePlanForAccountBuilder#createRequest()} to finally fetch the plan related this this account.
+ *
+ *
+ * GitHub Apps must use a JWT to access this endpoint.
+ *
+ * OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
+ *
+ * @return a GHMarketplaceListAccountBuilder instance
+ * @see List
+ * all GitHub accounts (user or organization) on a specific plan
+ */
+ public GHMarketplacePlanForAccountBuilder getPlan() {
+ return new GHMarketplacePlanForAccountBuilder(root(), this.id);
+ }
+
}
diff --git a/src/main/java/org/kohsuke/github/GHMarketplacePlanForAccountBuilder.java b/src/main/java/org/kohsuke/github/GHMarketplacePlanForAccountBuilder.java
new file mode 100644
index 0000000000..e5167f31ac
--- /dev/null
+++ b/src/main/java/org/kohsuke/github/GHMarketplacePlanForAccountBuilder.java
@@ -0,0 +1,45 @@
+package org.kohsuke.github;
+
+import java.io.IOException;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Returns the plan associated with current account.
+ *
+ * @author Benoit Lacelle
+ * @see GHMarketplacePlan#listAccounts()
+ * @see GitHub#listMarketplacePlans()
+ */
+public class GHMarketplacePlanForAccountBuilder extends GitHubInteractiveObject {
+ private final Requester builder;
+ private final long accountId;
+
+ /**
+ * Instantiates a new GH marketplace list account builder.
+ *
+ * @param root
+ * the root
+ * @param accountId
+ * the account id
+ */
+ GHMarketplacePlanForAccountBuilder(GitHub root, long accountId) {
+ super(root);
+ this.builder = root.createRequest();
+ this.accountId = accountId;
+ }
+
+ /**
+ * Fetch the plan associated with the account specified on construction.
+ *
+ * GitHub Apps must use a JWT to access this endpoint.
+ *
+ * @return a GHMarketplaceAccountPlan
+ * @throws IOException
+ * on error
+ */
+ public GHMarketplaceAccountPlan createRequest() throws IOException {
+ return builder.withUrlPath(String.format("/marketplace_listing/accounts/%d", this.accountId))
+ .fetch(GHMarketplaceAccountPlan.class);
+ }
+
+}
diff --git a/src/test/java/org/kohsuke/github/AbstractGHAppInstallationTest.java b/src/test/java/org/kohsuke/github/AbstractGHAppInstallationTest.java
index 40b9b0bdbf..9e70af58e0 100644
--- a/src/test/java/org/kohsuke/github/AbstractGHAppInstallationTest.java
+++ b/src/test/java/org/kohsuke/github/AbstractGHAppInstallationTest.java
@@ -1,5 +1,8 @@
package org.kohsuke.github;
+import com.nimbusds.jose.JOSEException;
+import com.nimbusds.jose.crypto.impl.RSAKeyUtils;
+import com.nimbusds.jose.jwk.RSAKey;
import io.jsonwebtoken.Jwts;
import org.apache.commons.io.IOUtils;
import org.kohsuke.github.authorization.AuthorizationProvider;
@@ -13,10 +16,13 @@
import java.security.KeyFactory;
import java.security.PrivateKey;
import java.security.spec.PKCS8EncodedKeySpec;
+import java.text.ParseException;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.Base64;
import java.util.Date;
+import java.util.List;
+import java.util.Set;
// TODO: Auto-generated Javadoc
/**
@@ -24,6 +30,11 @@
*/
public class AbstractGHAppInstallationTest extends AbstractGitHubWireMockTest {
+ private static String ENV_GITHUB_APP_ID = "GITHUB_APP_ID";
+ private static String ENV_GITHUB_APP_TOKEN = "GITHUB_APP_TOKEN";
+ private static String ENV_GITHUB_APP_ORG = "GITHUB_APP_ORG";
+ private static String ENV_GITHUB_APP_REPO = "GITHUB_APP_REPO";
+
private static String TEST_APP_ID_1 = "82994";
private static String TEST_APP_ID_2 = "83009";
private static String TEST_APP_ID_3 = "89368";
@@ -44,17 +55,31 @@ public class AbstractGHAppInstallationTest extends AbstractGitHubWireMockTest {
* Instantiates a new abstract GH app installation test.
*/
protected AbstractGHAppInstallationTest() {
+ String appId = System.getenv(ENV_GITHUB_APP_ID);
+ String appToken = System.getenv(ENV_GITHUB_APP_TOKEN);
try {
- jwtProvider1 = new JWTTokenProvider(TEST_APP_ID_1,
- new File(this.getClass().getResource(PRIVATE_KEY_FILE_APP_1).getFile()));
- jwtProvider2 = new JWTTokenProvider(TEST_APP_ID_2,
- new File(this.getClass().getResource(PRIVATE_KEY_FILE_APP_2).getFile()).toPath());
- jwtProvider3 = new JWTTokenProvider(TEST_APP_ID_3,
- new String(
- Files.readAllBytes(
- new File(this.getClass().getResource(PRIVATE_KEY_FILE_APP_3).getFile()).toPath()),
- StandardCharsets.UTF_8));
- } catch (GeneralSecurityException | IOException e) {
+ if (appId != null && appToken != null) {
+ RSAKey rsaJWK;
+ try {
+ rsaJWK = RSAKey.parse(appToken);
+ } catch (IllegalStateException | ParseException e) {
+ throw new IllegalStateException("Issue parsing privateKey", e);
+ }
+
+ jwtProvider1 = new JWTTokenProvider(appId, RSAKeyUtils.toRSAPrivateKey(rsaJWK));
+ jwtProvider2 = new JWTTokenProvider(appId, RSAKeyUtils.toRSAPrivateKey(rsaJWK));
+ jwtProvider3 = new JWTTokenProvider(appId, RSAKeyUtils.toRSAPrivateKey(rsaJWK));
+ } else {
+ jwtProvider1 = new JWTTokenProvider(TEST_APP_ID_1,
+ new File(this.getClass().getResource(PRIVATE_KEY_FILE_APP_1).getFile()));
+ jwtProvider2 = new JWTTokenProvider(TEST_APP_ID_2,
+ new File(this.getClass().getResource(PRIVATE_KEY_FILE_APP_2).getFile()).toPath());
+ jwtProvider3 = new JWTTokenProvider(TEST_APP_ID_3,
+ new String(Files.readAllBytes(
+ new File(this.getClass().getResource(PRIVATE_KEY_FILE_APP_3).getFile()).toPath()),
+ StandardCharsets.UTF_8));
+ }
+ } catch (GeneralSecurityException | IOException | JOSEException e) {
throw new RuntimeException("These should never fail", e);
}
}
@@ -89,17 +114,28 @@ private String createJwtToken(String keyFileResouceName, String appId) {
* Signals that an I/O exception has occurred.
*/
protected GHAppInstallation getAppInstallationWithToken(String jwtToken) throws IOException {
+ if (jwtToken.startsWith("Bearer ")) {
+ jwtToken = jwtToken.substring("Bearer ".length());
+ }
+
GitHub gitHub = getGitHubBuilder().withJwtToken(jwtToken)
.withEndpoint(mockGitHub.apiServer().baseUrl())
.build();
- GHAppInstallation appInstallation = gitHub.getApp()
- .listInstallations()
- .toList()
- .stream()
- .filter(it -> it.getAccount().login.equals("hub4j-test-org"))
- .findFirst()
- .get();
+ GHApp app = gitHub.getApp();
+
+ GHAppInstallation appInstallation;
+ if (Set.of(TEST_APP_ID_1, TEST_APP_ID_2, TEST_APP_ID_3).contains(Long.toString(app.getId()))) {
+ List
- * You use the returned builder to set various properties, then call
- * {@link GHMarketplacePlanForAccountBuilder#createRequest()} to finally fetch the plan related this this account.
- *
- *
* GitHub Apps must use a JWT to access this endpoint.
*
* OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
*
* @return a GHMarketplaceListAccountBuilder instance
+ * @throws IOException
* @see List
- * all GitHub accounts (user or organization) on a specific plan
+ * "https://docs.github.com/en/rest/apps/marketplace?apiVersion=2022-11-28#get-a-subscription-plan-for-an-account">Get
+ * a subscription plan for an account
*/
- public GHMarketplacePlanForAccountBuilder getPlan() {
- return new GHMarketplacePlanForAccountBuilder(root(), this.id);
+ public GHMarketplaceAccountPlan getPlan() throws IOException {
+ return new GHMarketplacePlanForAccountBuilder(root(), this.id).createRequest();
}
}
From cb089b9b79297ea785cceaf9830b866ffdd66f78 Mon Sep 17 00:00:00 2001
From: Benoit Lacelle
From 6cf735603a20b71c3ca05681e091b62dcbfd7527 Mon Sep 17 00:00:00 2001
From: Pierre Beitz Sourced from maven-enforcer-plugin's releases. Sourced from maven-enforcer-plugin's releases. Sourced from actions/stale's releases. :warning: This version contains breaking changes :warning: permissions:\npull-request: write jobs:\nstale:\nruns-on: ubuntu-latest\nsteps:\n- uses: actions/stale@v8\nwith:\nlabels-to-remove-when-stale: 'label1,label2'\n Sourced from actions/stale's changelog. :warning: Breaking change :warning: Update :warning: Breaking change :warning: Issues/PRs default Don't process stale issues right after they're marked stale\n[Add close-issue-reason option]#764#772\nVarious dependabot/dependency updates ... (truncated) Sourced from actions/stale's releases. :warning: This version contains breaking changes :warning: permissions:\npull-request: write jobs:\nstale:\nruns-on: ubuntu-latest\nsteps:\n- uses: actions/stale@v8\nwith:\nlabels-to-remove-when-stale: 'label1,label2'\n Sourced from actions/stale's changelog. :warning: Breaking change :warning: Update :warning: Breaking change :warning: Issues/PRs default Don't process stale issues right after they're marked stale\n[Add close-issue-reason option]#764#772\nVarious dependabot/dependency updates ... (truncated) Sourced from animal-sniffer-enforcer-rule's releases. Sourced from animal-sniffer-enforcer-rule's releases. Sourced from extra-enforcer-rules's releases. Sourced from extra-enforcer-rules's releases. ` this fails the javadoc generation:\r\n\r\n```\r\n Error: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar (attach-javadocs) on project zendesk-java-client: MavenReportException: Error while generating Javadoc: \r\nError: Exit code: 1 - /home/runner/work/zendesk-java-client/zendesk-java-client/src/main/java/org/zendesk/client/v2/model/hc/ContentTag.java:10: error: unexpected end tag: Release notes
\n\n
\n3.3.0
\n\n🚀 New features and improvements
\n\n
\n@slawekjaranowski
@slawekjaranowski
@alexey-anufriev
🐛 Bug Fixes
\n\n
\n@slawekjaranowski
@slawekjaranowski
@ajarmoniuk
@slawekjaranowski
@ajarmoniuk
📦 Dependency updates
\n\n
\n@dependabot
@dependabot
@dependabot
@dependabot
📝 Documentation updates
\n\n
\n@slawekjaranowski
@kwin
@lorenzpahl
banDynamicVersions.apt.vm
(#249) @rickie
👻 Maintenance
\n\n
\n@slawekjaranowski
@slawekjaranowski
@slawekjaranowski
Commits
\n\n
\n4e14e11
[maven-release-plugin] prepare release enforcer-3.3.0523f5ce
[MENFORCER-472] Bump maven-invoker-plugin from 3.5.0 to 3.5.1 (#266)427b213
[MENFORCER-473] Notice about max JDK in custom rules6feac61
improve documentation of banDynamicVersions435807f
Install maven-enforcer-plugin for ITs in maven-enforcer-extension5895ff2
[MENFORCER-467] banDynamicVersions excludedScopes on project level (#262)7848853
[MENFORCER-276] Allow ignoring dependency scopes in RequireUpperBoundDeps42dacab
[MENFORCER-476] Rename ResolveUtil to ResolverUtil5e0ca5a
[MENFORCER-474] Filter dependency by scope on project level57746a1
[MENFORCER-465] Remove superfluous blanks in BanDuplicatePomDependencyVersions
\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-enforcer-plugin&package-manager=maven&previous-version=3.2.1&new-version=3.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\nDependabot commands and options
\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\nRelease notes
\n\n
\n3.3.0
\n\n🚀 New features and improvements
\n\n
\n@slawekjaranowski
@slawekjaranowski
@alexey-anufriev
🐛 Bug Fixes
\n\n
\n@slawekjaranowski
@slawekjaranowski
@ajarmoniuk
@slawekjaranowski
@ajarmoniuk
📦 Dependency updates
\n\n
\n@dependabot
@dependabot
@dependabot
@dependabot
📝 Documentation updates
\n\n
\n@slawekjaranowski
@kwin
@lorenzpahl
banDynamicVersions.apt.vm
(#249) @rickie
👻 Maintenance
\n\n
\n@slawekjaranowski
@slawekjaranowski
@slawekjaranowski
Commits
\n\n
\n4e14e11
[maven-release-plugin] prepare release enforcer-3.3.0523f5ce
[MENFORCER-472] Bump maven-invoker-plugin from 3.5.0 to 3.5.1 (#266)427b213
[MENFORCER-473] Notice about max JDK in custom rules6feac61
improve documentation of banDynamicVersions435807f
Install maven-enforcer-plugin for ITs in maven-enforcer-extension5895ff2
[MENFORCER-467] banDynamicVersions excludedScopes on project level (#262)7848853
[MENFORCER-276] Allow ignoring dependency scopes in RequireUpperBoundDeps42dacab
[MENFORCER-476] Rename ResolveUtil to ResolverUtil5e0ca5a
[MENFORCER-474] Filter dependency by scope on project level57746a1
[MENFORCER-465] Remove superfluous blanks in BanDuplicatePomDependencyVersions
\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-enforcer-plugin&package-manager=maven&previous-version=3.2.1&new-version=3.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\nDependabot commands and options
\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\nRelease notes
\n\n
v8.0.0
\nWhat's Changed
\n\n
\n@panticmilos
actions/stale#770@dsame
actions/stale#913@dsame
in actions/stale#935Breaking Changes
\n\n
\nExample
\nname: 'Remove labels when the issue or PR becomes stale'\non:\n schedule:\n - cron: '30 1 * * *'\n
Changelog
\n\n
\nChangelog
\n[7.0.0]
\n\n
\n@irega
in actions/stale#841@jongwooo
in actions/stale#876@irega
in actions/stale#859@IvanZosimov
in actions/stale#880@johnsudol
in actions/stale#874[6.0.1]
\n@actions/core
to v1.10.0 (#839)[6.0.0]
\nclose-issue-reason
is now not_planned
(#789)[5.1.0]
\n4.1.0 (2021-07-14)
\nFeatures
\n\n4.0.0 (2021-07-14)
\nFeatures
\n\n
\nBug Fixes
\n\n
\nBreaking Changes
\n\nCommits
\n\n
\n1160a22
Merge pull request #965 from actions/dependabot/npm_and_yarn/prettier-2.8.65f7b396
build(deps-dev): bump prettier from 2.8.4 to 2.8.6b002e7e
Merge pull request #941 from panticmilos/vmpantic/rebuild-dist-vercel-bump5290373
Rebuild dist after rebaseb006677
Merge pull request #962 from actions/dependabot/npm_and_yarn/jest-and-types/j...4f29769
Merge pull request #961 from actions/dependabot/npm_and_yarn/typescript-5.0.283453dd
build(deps-dev): bump jest and @types/jest
79e8c04
Merge pull request #960 from actions/dependabot/npm_and_yarn/types/node-18.15.375d4d95
Remove labels on stale (#959)fac2d41
build(deps-dev): bump typescript from 4.9.4 to 5.0.2
\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/stale&package-manager=github_actions&previous-version=7&new-version=8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\nDependabot commands and options
\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\nRelease notes
\n\n
v8.0.0
\nWhat's Changed
\n\n
\n@panticmilos
actions/stale#770@dsame
actions/stale#913@dsame
in actions/stale#935Breaking Changes
\n\n
\nExample
\nname: 'Remove labels when the issue or PR becomes stale'\non:\n schedule:\n - cron: '30 1 * * *'\n
Changelog
\n\n
\nChangelog
\n[7.0.0]
\n\n
\n@irega
in actions/stale#841@jongwooo
in actions/stale#876@irega
in actions/stale#859@IvanZosimov
in actions/stale#880@johnsudol
in actions/stale#874[6.0.1]
\n@actions/core
to v1.10.0 (#839)[6.0.0]
\nclose-issue-reason
is now not_planned
(#789)[5.1.0]
\n4.1.0 (2021-07-14)
\nFeatures
\n\n4.0.0 (2021-07-14)
\nFeatures
\n\n
\nBug Fixes
\n\n
\nBreaking Changes
\n\nCommits
\n\n
\n1160a22
Merge pull request #965 from actions/dependabot/npm_and_yarn/prettier-2.8.65f7b396
build(deps-dev): bump prettier from 2.8.4 to 2.8.6b002e7e
Merge pull request #941 from panticmilos/vmpantic/rebuild-dist-vercel-bump5290373
Rebuild dist after rebaseb006677
Merge pull request #962 from actions/dependabot/npm_and_yarn/jest-and-types/j...4f29769
Merge pull request #961 from actions/dependabot/npm_and_yarn/typescript-5.0.283453dd
build(deps-dev): bump jest and @types/jest
79e8c04
Merge pull request #960 from actions/dependabot/npm_and_yarn/types/node-18.15.375d4d95
Remove labels on stale (#959)fac2d41
build(deps-dev): bump typescript from 4.9.4 to 5.0.2
\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/stale&package-manager=github_actions&previous-version=7&new-version=8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\nDependabot commands and options
\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\nRelease notes
\n\n
\n1.23
\n\n🚀 New features and improvements
\n\n
\n@slawekjaranowski
@cstamas
@Marcono1234
📦 Dependency updates
\n\n
\n@slawekjaranowski
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
👻 Maintenance
\n\n
\n@slawekjaranowski
@slachiewicz
@hbeni
@Marcono1234
Commits
\n\n
\nbae2423
[maven-release-plugin] prepare release 1.2390f22e4
Refresh documentation site49fdd5d
Bump parent from 70 to 74 and poms cleanupfa0f098
Get rid of maven-compat use Resolver API4f547b0
(ci) Use latest releases of Maven 3.9.1 and 3.8.8ac9296b
Bump maven-surefire-plugin from 2.22.2 to 3.0.0f343158
Prepare to run on Java 19+797ccf7
Bump plexus-utils from 3.5.0 to 3.5.12ce6d43
Bump maven-plugin-plugin from 3.7.1 to 3.8.19452d08
Bump maven-plugin-annotations from 3.7.1 to 3.8.1
\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.codehaus.mojo:animal-sniffer-enforcer-rule&package-manager=maven&previous-version=1.22&new-version=1.23)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\nDependabot commands and options
\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\nRelease notes
\n\n
\n1.23
\n\n🚀 New features and improvements
\n\n
\n@slawekjaranowski
@cstamas
@Marcono1234
📦 Dependency updates
\n\n
\n@slawekjaranowski
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
👻 Maintenance
\n\n
\n@slawekjaranowski
@slachiewicz
@hbeni
@Marcono1234
Commits
\n\n
\nbae2423
[maven-release-plugin] prepare release 1.2390f22e4
Refresh documentation site49fdd5d
Bump parent from 70 to 74 and poms cleanupfa0f098
Get rid of maven-compat use Resolver API4f547b0
(ci) Use latest releases of Maven 3.9.1 and 3.8.8ac9296b
Bump maven-surefire-plugin from 2.22.2 to 3.0.0f343158
Prepare to run on Java 19+797ccf7
Bump plexus-utils from 3.5.0 to 3.5.12ce6d43
Bump maven-plugin-plugin from 3.7.1 to 3.8.19452d08
Bump maven-plugin-annotations from 3.7.1 to 3.8.1
\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.codehaus.mojo:animal-sniffer-enforcer-rule&package-manager=maven&previous-version=1.22&new-version=1.23)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\nDependabot commands and options
\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\nRelease notes
\n\n
\n1.6.2
\n\n🐛 Bug Fixes
\n\n
\n@slawekjaranowski
📦 Dependency updates
\n\n
\n@dependabot
@slawekjaranowski
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
👻 Maintenance
\n\n
\n@slawekjaranowski
@slawekjaranowski
@dependabot
@slawekjaranowski
@slawekjaranowski
@pzygielo
Commits
\n\n
\nbc834e6
[maven-release-plugin] prepare release 1.6.2f257b04
Fix broken links in documentation6803922
Use Maven 3.9.1 on GitHub829dade
Bump spring-core in /src/it/banduplicate-classes-wildcard-exclusion1e7b0e3
Bump mojo-parent from 73 to 74de48f6d
Add .git-blame-ignore-revs with last code reformatf97cc25
Enable checkstyle and spotless plugins - code reformat8a9addf
Enable checkstyle and spotless plugins86feda3
Use Maven 3.9.0 for build on GitHubebb2df5
Bump parent from 70 to 73
\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.codehaus.mojo:extra-enforcer-rules&package-manager=maven&previous-version=1.6.1&new-version=1.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\nDependabot commands and options
\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\nRelease notes
\n\n
\n1.6.2
\n\n🐛 Bug Fixes
\n\n
\n@slawekjaranowski
📦 Dependency updates
\n\n
\n@dependabot
@slawekjaranowski
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
@dependabot
👻 Maintenance
\n\n
\n@slawekjaranowski
@slawekjaranowski
@dependabot
@slawekjaranowski
@slawekjaranowski
@pzygielo
Commits
\n\n
\nbc834e6
[maven-release-plugin] prepare release 1.6.2f257b04
Fix broken links in documentation6803922
Use Maven 3.9.1 on GitHub829dade
Bump spring-core in /src/it/banduplicate-classes-wildcard-exclusion1e7b0e3
Bump mojo-parent from 73 to 74de48f6d
Add .git-blame-ignore-revs with last code reformatf97cc25
Enable checkstyle and spotless plugins - code reformat8a9addf
Enable checkstyle and spotless plugins86feda3
Use Maven 3.9.0 for build on GitHubebb2df5
Bump parent from 70 to 73
\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.codehaus.mojo:extra-enforcer-rules&package-manager=maven&previous-version=1.6.1&new-version=1.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\nDependabot commands and options
\n
\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\n
367d997
[maven-release-plugin] prepare release netty-4.1.90.Final0e8af54
Chunked HTTP length decoding should account for whitespaces/ctrl chars (Fixes...ab5c411
Handle NullPointerException thrown from NetworkInterface.getNetworkInterfaces...ebfc79c
WebSocketClientProtocolHandler: add option to disable UTF8 validation of text...8fac718
Don't reset BCSSLParameters when setting application protocols (#13262)c353f4f
Faster Recycler's claim/release (Fixes #13153) (#13220)84cf7d6
Native image: add support for unix domain sockets (#13242)99204e9
Skip revapi checks for testsuite modules (#13258)971aa8a
Use MacOS SDK 10.9 to prevent apple notarization failures (#13253)5d1f996
Increase errno cache and guard against IOOBE (#13254)367d997
[maven-release-plugin] prepare release netty-4.1.90.Final0e8af54
Chunked HTTP length decoding should account for whitespaces/ctrl chars (Fixes...ab5c411
Handle NullPointerException thrown from NetworkInterface.getNetworkInterfaces...ebfc79c
WebSocketClientProtocolHandler: add option to disable UTF8 validation of text...8fac718
Don't reset BCSSLParameters when setting application protocols (#13262)c353f4f
Faster Recycler's claim/release (Fixes #13153) (#13220)84cf7d6
Native image: add support for unix domain sockets (#13242)99204e9
Skip revapi checks for testsuite modules (#13258)971aa8a
Use MacOS SDK 10.9 to prevent apple notarization failures (#13253)5d1f996
Increase errno cache and guard against IOOBE (#13254)Sourced from maven-enforcer-plugin's releases.
\n\n\n3.2.1
\n\n🚨 Removed
\n\n
\n- [MENFORCER-435] - Remove not needed maven-dependency-tree and maven-compat (#202)
\n@slawekjaranowski
- remove specific IDE m2e files (#192)
\n@olamy
🚀 New features and improvements
\n\n
\n- [MENFORCER-463] - Change success message from executed to passed (#242)
\n@slawekjaranowski
- [MENFORCER-415] - Move error message to MojoException (#239)
\n@slawekjaranowski
- [MENFORCER-460] - Deprecate display-info mojo (#237)
\n@slawekjaranowski
- [MENFORCER-458] - Move Build-in rules to new API (#236)
\n@slawekjaranowski
- [MENFORCER-458] - Move Build-in rules to new API (#233)
\n@slawekjaranowski
- [MENFORCER-458] - Move Require Java, Maven Version to new API (#232)
\n@slawekjaranowski
- [MENFORCER-458] - Move Require Property,Environment to new API (#231)
\n@slawekjaranowski
- [MENFORCER-458] - Move Require*Checksum to new API (#230)
\n@slawekjaranowski
- [MENFORCER-458] - Move RequireFiles* to new API (#228)
\n@slawekjaranowski
- [MENFORCER-458] - Move RequireOS to new API (#227)
\n@slawekjaranowski
- [MENFORCER-456] - New Enforcer API - RuleConfigProvider (#220)
\n@slawekjaranowski
- [MENFORCER-444] - Improve error message for failed version rules (#218)
\n@kwin
- [MENFORCER-455] - New Enforcer API (#216)
\n@slawekjaranowski
- [MENFORCER-445] - Include JAVA_HOME location in the Java rule failure messages (#213)
\n@psiroky
- [MENFORCER-454] - Deprecate 'rules' property and introduce 'enforcer.rules' as a replacement (#211)
\n@psiroky
- [MENFORCER-431] - Introduce option to skip specific rules via custom property (#205)
\n@psiroky
- [MENFORCER-453] - Mange rules configuration by plugin (#207)
\n@slawekjaranowski
- [MENFORCER-435] - Replacing maven-compat and maven-dependency-tree usage with Resolver (#198)
\n@ajarmoniuk
- [MENFORCER-440] - Allow 8 as JDK version for requireJavaVersion (#195)
\n@slawekjaranowski
- [MENFORCER-411] - DependencyConvergence takes include/exclude parameters to filter errors (#136)
\n@fdfea
- [MENFORCER-427] - New rule to ban dynamic versions (#187)
\n@kwin
- [MENFORCER-430] - Allow one of many files in RequireFiles rules to pass (#183)
\n@raupachz
- [MENFORCER-423] - Add rule to enforce an explicit dependency scope (#179)
\n@kwin
- [MENFORCER-422] - Added externalRules rule (#180)
\n@gastaldi
- [MENFORCER-397] - allow no rules (#178)
\n@raupachz
- [MENFORCER-398] - show rules processed (#175)
\n@raupachz
- [MENFORCER-424] - add enforcer rule which bans scope from (#169)
\n@kwin
🐛 Bug Fixes
\n\n
\n- [MENFORCER-462] - Execute ReactorModuleConvergence only once (#241)
\n@slawekjaranowski
- [MENFORCER-461] - Fix NPE in RequirePluginVersions (#240)
\n@slawekjaranowski
- [MENFORCER-459] - Avoid NullPointerException where there is no plugins (#193)
\n@turbanoff
- [MENFORCER-434] - Regression bannedDependencies - matching with not existing versions (#223)
\n@slawekjaranowski
- [MENFORCER-378] - Regression for non existing optional dependency (#222)
\n@slawekjaranowski
- [MENFORCER-407] - Regression for dependencyConvergence - transitive provided (#221)
\n@slawekjaranowski
📦 Dependency updates
\n\n
\n\n- [MENFORCER-457] - Bump assertj-core from 3.24.1 to 3.24.2 (#235)
\n@dependabot
- [MENFORCER-443] - Bump junit-bom from 5.9.1 to 5.9.2 (#229)
\n@dependabot
... (truncated)
\n4244e6a
[maven-release-plugin] prepare release enforcer-3.2.165d68a3
[MENFORCER-464] Refresh site descriptors73fef5a
[MENFORCER-463] Change success message from executed to passed769da0a
[MENFORCER-462] Execute ReactorModuleConvergence only once3e12af9
[MENFORCER-461] Fix NPE in RequirePluginVersions86c0cc5
[maven-release-plugin] prepare for next development iteration1937067
[maven-release-plugin] prepare release enforcer-3.2.084e0363
[MENFORCER-440] Fix pattern for Java 8 version4bbf7cd
[MENFORCER-415] Move error message to MojoException26697b1
[MENFORCER-450] Code cleanupSourced from maven-enforcer-plugin's releases.
\n\n\n3.2.1
\n\n🚨 Removed
\n\n
\n- [MENFORCER-435] - Remove not needed maven-dependency-tree and maven-compat (#202)
\n@slawekjaranowski
- remove specific IDE m2e files (#192)
\n@olamy
🚀 New features and improvements
\n\n
\n- [MENFORCER-463] - Change success message from executed to passed (#242)
\n@slawekjaranowski
- [MENFORCER-415] - Move error message to MojoException (#239)
\n@slawekjaranowski
- [MENFORCER-460] - Deprecate display-info mojo (#237)
\n@slawekjaranowski
- [MENFORCER-458] - Move Build-in rules to new API (#236)
\n@slawekjaranowski
- [MENFORCER-458] - Move Build-in rules to new API (#233)
\n@slawekjaranowski
- [MENFORCER-458] - Move Require Java, Maven Version to new API (#232)
\n@slawekjaranowski
- [MENFORCER-458] - Move Require Property,Environment to new API (#231)
\n@slawekjaranowski
- [MENFORCER-458] - Move Require*Checksum to new API (#230)
\n@slawekjaranowski
- [MENFORCER-458] - Move RequireFiles* to new API (#228)
\n@slawekjaranowski
- [MENFORCER-458] - Move RequireOS to new API (#227)
\n@slawekjaranowski
- [MENFORCER-456] - New Enforcer API - RuleConfigProvider (#220)
\n@slawekjaranowski
- [MENFORCER-444] - Improve error message for failed version rules (#218)
\n@kwin
- [MENFORCER-455] - New Enforcer API (#216)
\n@slawekjaranowski
- [MENFORCER-445] - Include JAVA_HOME location in the Java rule failure messages (#213)
\n@psiroky
- [MENFORCER-454] - Deprecate 'rules' property and introduce 'enforcer.rules' as a replacement (#211)
\n@psiroky
- [MENFORCER-431] - Introduce option to skip specific rules via custom property (#205)
\n@psiroky
- [MENFORCER-453] - Mange rules configuration by plugin (#207)
\n@slawekjaranowski
- [MENFORCER-435] - Replacing maven-compat and maven-dependency-tree usage with Resolver (#198)
\n@ajarmoniuk
- [MENFORCER-440] - Allow 8 as JDK version for requireJavaVersion (#195)
\n@slawekjaranowski
- [MENFORCER-411] - DependencyConvergence takes include/exclude parameters to filter errors (#136)
\n@fdfea
- [MENFORCER-427] - New rule to ban dynamic versions (#187)
\n@kwin
- [MENFORCER-430] - Allow one of many files in RequireFiles rules to pass (#183)
\n@raupachz
- [MENFORCER-423] - Add rule to enforce an explicit dependency scope (#179)
\n@kwin
- [MENFORCER-422] - Added externalRules rule (#180)
\n@gastaldi
- [MENFORCER-397] - allow no rules (#178)
\n@raupachz
- [MENFORCER-398] - show rules processed (#175)
\n@raupachz
- [MENFORCER-424] - add enforcer rule which bans scope from (#169)
\n@kwin
🐛 Bug Fixes
\n\n
\n- [MENFORCER-462] - Execute ReactorModuleConvergence only once (#241)
\n@slawekjaranowski
- [MENFORCER-461] - Fix NPE in RequirePluginVersions (#240)
\n@slawekjaranowski
- [MENFORCER-459] - Avoid NullPointerException where there is no plugins (#193)
\n@turbanoff
- [MENFORCER-434] - Regression bannedDependencies - matching with not existing versions (#223)
\n@slawekjaranowski
- [MENFORCER-378] - Regression for non existing optional dependency (#222)
\n@slawekjaranowski
- [MENFORCER-407] - Regression for dependencyConvergence - transitive provided (#221)
\n@slawekjaranowski
📦 Dependency updates
\n\n
\n\n- [MENFORCER-457] - Bump assertj-core from 3.24.1 to 3.24.2 (#235)
\n@dependabot
- [MENFORCER-443] - Bump junit-bom from 5.9.1 to 5.9.2 (#229)
\n@dependabot
... (truncated)
\n4244e6a
[maven-release-plugin] prepare release enforcer-3.2.165d68a3
[MENFORCER-464] Refresh site descriptors73fef5a
[MENFORCER-463] Change success message from executed to passed769da0a
[MENFORCER-462] Execute ReactorModuleConvergence only once3e12af9
[MENFORCER-461] Fix NPE in RequirePluginVersions86c0cc5
[maven-release-plugin] prepare for next development iteration1937067
[maven-release-plugin] prepare release enforcer-3.2.084e0363
[MENFORCER-440] Fix pattern for Java 8 version4bbf7cd
[MENFORCER-415] Move error message to MojoException26697b1
[MENFORCER-450] Code cleanup5ff6f2c
prepare for release 2.0.62f4aa75
fix SLF4J-575363f0a5
remove unused parts171679b
SLF4J-574: Add full OSGi headers, especially "uses" clauses921b5b3
fix FUNDING filee02244c
fix FUNDING file441d458
fix FUNDING filef5e741b
add FUNDING file2e71327
remove unused log4j dependency in the version definition section of pom.xml3ff2a30
start work on 2.0.6-SNAPSHOT5ff6f2c
prepare for release 2.0.62f4aa75
fix SLF4J-575363f0a5
remove unused parts171679b
SLF4J-574: Add full OSGi headers, especially "uses" clauses921b5b3
fix FUNDING filee02244c
fix FUNDING file441d458
fix FUNDING filef5e741b
add FUNDING file2e71327
remove unused log4j dependency in the version definition section of pom.xml3ff2a30
start work on 2.0.6-SNAPSHOT5ff6f2c
prepare for release 2.0.62f4aa75
fix SLF4J-575363f0a5
remove unused parts171679b
SLF4J-574: Add full OSGi headers, especially "uses" clauses921b5b3
fix FUNDING filee02244c
fix FUNDING file441d458
fix FUNDING filef5e741b
add FUNDING file2e71327
remove unused log4j dependency in the version definition section of pom.xml3ff2a30
start work on 2.0.6-SNAPSHOT5ff6f2c
prepare for release 2.0.62f4aa75
fix SLF4J-575363f0a5
remove unused parts171679b
SLF4J-574: Add full OSGi headers, especially "uses" clauses921b5b3
fix FUNDING filee02244c
fix FUNDING file441d458
fix FUNDING filef5e741b
add FUNDING file2e71327
remove unused log4j dependency in the version definition section of pom.xml3ff2a30
start work on 2.0.6-SNAPSHOTSourced from actions/stale's releases.
\n\n\nv7.0.0
\n⚠️ This version contains breaking changes ⚠️
\nWhat's Changed
\n\n
\n- Allow daysBeforeStale options to be float by
\n@irega
in actions/stale#841- Use cache in check-dist.yml by
\n@jongwooo
in actions/stale#876- fix print outputs step in existing workflows by
\n@irega
in actions/stale#859- Update issue and PR templates, add/delete workflow files by
\n@IvanZosimov
in actions/stale#880- Update how stale handles exempt items by
\n@johnsudol
in actions/stale#874Breaking Changes
\n\n
\n- In this release we prevent this action from managing the
\nstale
label on items included inexempt-issue-labels
andexempt-pr-labels
- We decided that this is outside of the scope of this action, and to be left up to the maintainer
\nNew Contributors
\n\n
\n- \n
@irega
made their first contribution in actions/stale#841- \n
@jongwooo
made their first contribution in actions/stale#876- \n
@IvanZosimov
made their first contribution in actions/stale#880- \n
@johnsudol
made their first contribution in actions/stale#874Full Changelog: https://github.com/actions/stale/compare/v6...v7.0.0
\nv6.0.1
\nUpdate
\n@actions/core
to 1.10.0 #839Full Changelog: https://github.com/actions/stale/compare/v6.0.0...v6.0.1
\n
Sourced from actions/stale's changelog.
\n\n\nChangelog
\n[7.0.0]
\n:warning: Breaking change :warning:
\n\n
\n- Allow daysBeforeStale options to be float by
\n@irega
in actions/stale#841- Use cache in check-dist.yml by
\n@jongwooo
in actions/stale#876- fix print outputs step in existing workflows by
\n@irega
in actions/stale#859- Update issue and PR templates, add/delete workflow files by
\n@IvanZosimov
in actions/stale#880- Update how stale handles exempt items by
\n@johnsudol
in actions/stale#874[6.0.1]
\nUpdate
\n@actions/core
to v1.10.0 (#839)[6.0.0]
\n:warning: Breaking change :warning:
\nIssues/PRs default
\nclose-issue-reason
is nownot_planned
(#789)[5.1.0]
\nDon't process stale issues right after they're marked stale\n[Add close-issue-reason option]#764#772\nVarious dependabot/dependency updates
\n4.1.0 (2021-07-14)
\nFeatures
\n\n4.0.0 (2021-07-14)
\nFeatures
\n\n
\n- options: simplify config by removing skip stale message options (#457) (6ec637d), closes #405 #455
\n- output: print output parameters (#458) (3e6d35b)
\nBug Fixes
\n\n
\n- dry-run: forbid mutations in dry-run (#500) (f1017f3), closes #499
\n- logs: coloured logs (#465) (5fbbfba)
\n- operations: fail fast the current batch to respect the operations limit (#474) (5f6f311), closes #466
\n- label comparison: make label comparison case insensitive #517, closes #516
\n- filtering comments by actor could have strange behavior: "stale" comments are now detected based on if the message is the stale message not who made the comment(#519), fixes #441, #509, #518
\nBreaking Changes
\n\n
... (truncated)
\n6f05e42
draft release for v7.0.0 (#888)eed91cb
Update how stale handles exempt items (#874)10dc265
Merge pull request #880 from akv-platform/update-stale-repo9c1eb3f
Update .md files and allign build-test.yml with the current test.ymlbc357bd
Update .github/workflows/release-new-action-version.yml690ede5
Update .github/ISSUE_TEMPLATE/bug_report.mdafbcabf
Merge branch 'main' into update-stale-repoe364411
Update name of codeql.yml file627cef3
fix print outputs step (#859)975308f
Merge pull request #876 from jongwooo/chore/use-cache-in-check-distSourced from actions/stale's releases.
\n\n\nv7.0.0
\n⚠️ This version contains breaking changes ⚠️
\nWhat's Changed
\n\n
\n- Allow daysBeforeStale options to be float by
\n@irega
in actions/stale#841- Use cache in check-dist.yml by
\n@jongwooo
in actions/stale#876- fix print outputs step in existing workflows by
\n@irega
in actions/stale#859- Update issue and PR templates, add/delete workflow files by
\n@IvanZosimov
in actions/stale#880- Update how stale handles exempt items by
\n@johnsudol
in actions/stale#874Breaking Changes
\n\n
\n- In this release we prevent this action from managing the
\nstale
label on items included inexempt-issue-labels
andexempt-pr-labels
- We decided that this is outside of the scope of this action, and to be left up to the maintainer
\nNew Contributors
\n\n
\n- \n
@irega
made their first contribution in actions/stale#841- \n
@jongwooo
made their first contribution in actions/stale#876- \n
@IvanZosimov
made their first contribution in actions/stale#880- \n
@johnsudol
made their first contribution in actions/stale#874Full Changelog: https://github.com/actions/stale/compare/v6...v7.0.0
\nv6.0.1
\nUpdate
\n@actions/core
to 1.10.0 #839Full Changelog: https://github.com/actions/stale/compare/v6.0.0...v6.0.1
\n
Sourced from actions/stale's changelog.
\n\n\nChangelog
\n[7.0.0]
\n:warning: Breaking change :warning:
\n\n
\n- Allow daysBeforeStale options to be float by
\n@irega
in actions/stale#841- Use cache in check-dist.yml by
\n@jongwooo
in actions/stale#876- fix print outputs step in existing workflows by
\n@irega
in actions/stale#859- Update issue and PR templates, add/delete workflow files by
\n@IvanZosimov
in actions/stale#880- Update how stale handles exempt items by
\n@johnsudol
in actions/stale#874[6.0.1]
\nUpdate
\n@actions/core
to v1.10.0 (#839)[6.0.0]
\n:warning: Breaking change :warning:
\nIssues/PRs default
\nclose-issue-reason
is nownot_planned
(#789)[5.1.0]
\nDon't process stale issues right after they're marked stale\n[Add close-issue-reason option]#764#772\nVarious dependabot/dependency updates
\n4.1.0 (2021-07-14)
\nFeatures
\n\n4.0.0 (2021-07-14)
\nFeatures
\n\n
\n- options: simplify config by removing skip stale message options (#457) (6ec637d), closes #405 #455
\n- output: print output parameters (#458) (3e6d35b)
\nBug Fixes
\n\n
\n- dry-run: forbid mutations in dry-run (#500) (f1017f3), closes #499
\n- logs: coloured logs (#465) (5fbbfba)
\n- operations: fail fast the current batch to respect the operations limit (#474) (5f6f311), closes #466
\n- label comparison: make label comparison case insensitive #517, closes #516
\n- filtering comments by actor could have strange behavior: "stale" comments are now detected based on if the message is the stale message not who made the comment(#519), fixes #441, #509, #518
\nBreaking Changes
\n\n
... (truncated)
\n6f05e42
draft release for v7.0.0 (#888)eed91cb
Update how stale handles exempt items (#874)10dc265
Merge pull request #880 from akv-platform/update-stale-repo9c1eb3f
Update .md files and allign build-test.yml with the current test.ymlbc357bd
Update .github/workflows/release-new-action-version.yml690ede5
Update .github/ISSUE_TEMPLATE/bug_report.mdafbcabf
Merge branch 'main' into update-stale-repoe364411
Update name of codeql.yml file627cef3
fix print outputs step (#859)975308f
Merge pull request #876 from jongwooo/chore/use-cache-in-check-dist6a38163
[maven-release-plugin] prepare release jackson-bom-2.14.26579bfc
Prepare for 2.14.2 release380ca76
Back to snapshot depsce91dcc
[maven-release-plugin] prepare for next development iteration28345e8
[maven-release-plugin] prepare release jackson-bom-2.14.10d678d3
...04e59a5
Merge branch '2.14' of github.com:FasterXML/jackson-bom into 2.14806813d
[maven-release-plugin] prepare release jackson-bom-2.14.12a00d4b
Prepare for 2.14.1 release70c86d4
Merge pull request #55 from yeikel/patch-16a38163
[maven-release-plugin] prepare release jackson-bom-2.14.26579bfc
Prepare for 2.14.2 release380ca76
Back to snapshot depsce91dcc
[maven-release-plugin] prepare for next development iteration28345e8
[maven-release-plugin] prepare release jackson-bom-2.14.10d678d3
...04e59a5
Merge branch '2.14' of github.com:FasterXML/jackson-bom into 2.14806813d
[maven-release-plugin] prepare release jackson-bom-2.14.12a00d4b
Prepare for 2.14.1 release70c86d4
Merge pull request #55 from yeikel/patch-1263a745
[maven-release-plugin] prepare release netty-4.1.89.Finaled425fe
Don't fail on HttpObjectDecoder's maxHeaderSize greater then (Integer.MAX_VAL...a803e10
Revert "Revert "Speed-up HTTP 1.1 header and line parsing (#12321)""9993e07
Revert "Speed-up HTTP 1.1 header and line parsing (#12321)"4475b5c
[maven-release-plugin] prepare for next development iteration828ea7c
[maven-release-plugin] prepare release netty-4.1.88.Finald010e63
Add handling of inflight lookups to reduce real queries when lookup same host...6c0e69a
WebSocketServerProtocolHandler: make HandshakeComplete constructor public (#1...06f70a4
AsciiStrings can be batch-encoded (#13197)272d749
Add unit test that verifies cancelled entries in ChannelOutboundBuffer are co...263a745
[maven-release-plugin] prepare release netty-4.1.89.Finaled425fe
Don't fail on HttpObjectDecoder's maxHeaderSize greater then (Integer.MAX_VAL...a803e10
Revert "Revert "Speed-up HTTP 1.1 header and line parsing (#12321)""9993e07
Revert "Speed-up HTTP 1.1 header and line parsing (#12321)"4475b5c
[maven-release-plugin] prepare for next development iteration828ea7c
[maven-release-plugin] prepare release netty-4.1.88.Finald010e63
Add handling of inflight lookups to reduce real queries when lookup same host...6c0e69a
WebSocketServerProtocolHandler: make HandshakeComplete constructor public (#1...06f70a4
AsciiStrings can be batch-encoded (#13197)272d749
Add unit test that verifies cancelled entries in ChannelOutboundBuffer are co...Sourced from release-drafter/release-drafter's releases.
\n\n\nv5.23.0
\nWhat's Changed
\nNew
\n\n
\n- Add
\ninclude-pre-releases
configuration option (#1302)@robbinjanssen
Full Changelog: https://github.com/release-drafter/release-drafter/compare/v5.22.0...v5.23.0
\nv5.22.0
\nWhat's Changed
\nNew
\n\n
\n- Only use last full release when drafting (#1240)
\n@ssbarnea
Full Changelog: https://github.com/release-drafter/release-drafter/compare/v5.21.1...v5.22.0
\n
Sourced from release-drafter/release-drafter's releases.
\n\n\nv5.23.0
\nWhat's Changed
\nNew
\n\n
\n- Add
\ninclude-pre-releases
configuration option (#1302)@robbinjanssen
Full Changelog: https://github.com/release-drafter/release-drafter/compare/v5.22.0...v5.23.0
\nv5.22.0
\nWhat's Changed
\nNew
\n\n
\n- Only use last full release when drafting (#1240)
\n@ssbarnea
Full Changelog: https://github.com/release-drafter/release-drafter/compare/v5.21.1...v5.22.0
\n
Sourced from wiremock-jre8-standalone's releases.
\n\n\n2.35.0
\nEnhancements
\n\n
\n- Add a negative contains matcher - thanks Damian Orzepowski
\n- Expose a Java API method for removing stubs by ID - thanks Patryk Fraczek
\n- Document the import API in the OpenAPI doc - thanks to user i-whammy
\n- Added the ability to restrict the addresses WireMock can proxy/record to, as a security measure.
\nFixes
\n\n
\n- Strip Maven directories from the standalone JAR as some were appearing that weren't related to dependencies actually present, confusing scanning tools - thanks to user krageon
\n- Dropped back to slf4j 1.7.36 and relocate it in the standalone JAR (ensuring 2.x users won't experience conflicts).
\n
a137ab1
Fixed #1684 - Expose remove stub mapping by ID (#1986)6cfd74d
Bump mockito-core from 4.8.0 to 4.8.1 (#1998)328f6e5
Bumped minor versione1368f4
Added slf4j no-op (disables logging and annoying messages from slf4j) to the ...1f43b27
Dropped back down to slf4j 1.7.36 and relocated it in the standalone JAR to a...b367b7b
Switched BodyChunker to use the configured notifier rather than creating its owndac7adb
Bumping Handlebars library version to 4.3.1, that includes the fixed (#1995)bfc5f1d
removes maven dir in output shadow jar (#1993)0746383
Bump versions.jsonUnit from 2.35.0 to 2.36.0 (#1976)d77938b
Bump asm from 9.3 to 9.4 (#1974)%g
for a number\r\n```",
+ "created_at": "2023-01-30T10:23:31Z",
+ "updated_at": "2023-01-30T10:23:32Z",
+ "html_url": "https://github.com/jenkinsci/audit-trail-plugin/pull/96#discussion_r1090430884",
+ "pull_request_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96",
+ "author_association": "CONTRIBUTOR",
+ "_links": {
+ "self": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/comments/1090430884"
+ },
+ "html": {
+ "href": "https://github.com/jenkinsci/audit-trail-plugin/pull/96#discussion_r1090430884"
+ },
+ "pull_request": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96"
+ }
+ },
+ "reactions": {
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/comments/1090430884/reactions",
+ "total_count": 0,
+ "+1": 0,
+ "-1": 0,
+ "laugh": 0,
+ "hooray": 0,
+ "confused": 0,
+ "heart": 0,
+ "rocket": 0,
+ "eyes": 0
+ },
+ "start_line": null,
+ "original_start_line": null,
+ "start_side": null,
+ "line": 4,
+ "original_line": 4,
+ "side": "RIGHT"
+ },
+ "pull_request": {
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96",
+ "id": 1166633695,
+ "node_id": "PR_kwDOABHApc5FiWrf",
+ "html_url": "https://github.com/jenkinsci/audit-trail-plugin/pull/96",
+ "diff_url": "https://github.com/jenkinsci/audit-trail-plugin/pull/96.diff",
+ "patch_url": "https://github.com/jenkinsci/audit-trail-plugin/pull/96.patch",
+ "issue_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/96",
+ "number": 96,
+ "state": "open",
+ "locked": false,
+ "title": "Add daily rotation logs for LogFileAuditLogger",
+ "user": {
+ "login": "fbelzunc",
+ "id": 3898648,
+ "node_id": "MDQ6VXNlcjM4OTg2NDg=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3898648?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/fbelzunc",
+ "html_url": "https://github.com/fbelzunc",
+ "followers_url": "https://api.github.com/users/fbelzunc/followers",
+ "following_url": "https://api.github.com/users/fbelzunc/following{/other_user}",
+ "gists_url": "https://api.github.com/users/fbelzunc/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/fbelzunc/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/fbelzunc/subscriptions",
+ "organizations_url": "https://api.github.com/users/fbelzunc/orgs",
+ "repos_url": "https://api.github.com/users/fbelzunc/repos",
+ "events_url": "https://api.github.com/users/fbelzunc/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/fbelzunc/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "body": "The current PR adds the functionality of rotating logs daily instead of per file size.\r\n\r\nThis is very useful in case you are saving audit logs for auditing purposes as you have a file per day that represents the changes performed on that specific day. You could then send them to an S3 bucket for example. \r\n\r\nThe files will be created in the specified configured location `Log Location: /tmp/audit-trail-logs/audit.log` and will create files like the ones below. Adding at the end of the specified file a data timestamp.\r\n\r\n```\r\naudit.log-2022-12-16\r\naudit.log-2022-12-15\r\naudit.log-2022-12-14\r\n```\r\n\r\nCC @chikitulfo\r\n\r\n\r\n\r\n- [X] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!\r\n- [X] Ensure that the pull request title represents the desired changelog entry\r\n- [X] Please describe what you did\r\n- [ ] Link to relevant issues in GitHub or Jira\r\n- [ ] Link to relevant pull requests, esp. upstream and downstream changes\r\n- [X] Ensure you have provided tests - that demonstrates feature works or fixes the issue\r\n\r\n\r\n",
+ "created_at": "2022-12-15T11:28:13Z",
+ "updated_at": "2023-01-30T10:23:32Z",
+ "closed_at": null,
+ "merged_at": null,
+ "merge_commit_sha": "eea7c192fecdbb91e263890a7c5ca0610ea8245d",
+ "assignee": null,
+ "assignees": [],
+ "requested_reviewers": [],
+ "requested_teams": [],
+ "labels": [],
+ "milestone": null,
+ "draft": false,
+ "commits_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96/commits",
+ "review_comments_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96/comments",
+ "review_comment_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/comments{/number}",
+ "comments_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/96/comments",
+ "statuses_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/statuses/b65dc6cb57e438ebae7e372c812c498a32d9e9f0",
+ "head": {
+ "label": "fbelzunc:daily-rotation",
+ "ref": "daily-rotation",
+ "sha": "b65dc6cb57e438ebae7e372c812c498a32d9e9f0",
+ "user": {
+ "login": "fbelzunc",
+ "id": 3898648,
+ "node_id": "MDQ6VXNlcjM4OTg2NDg=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3898648?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/fbelzunc",
+ "html_url": "https://github.com/fbelzunc",
+ "followers_url": "https://api.github.com/users/fbelzunc/followers",
+ "following_url": "https://api.github.com/users/fbelzunc/following{/other_user}",
+ "gists_url": "https://api.github.com/users/fbelzunc/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/fbelzunc/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/fbelzunc/subscriptions",
+ "organizations_url": "https://api.github.com/users/fbelzunc/orgs",
+ "repos_url": "https://api.github.com/users/fbelzunc/repos",
+ "events_url": "https://api.github.com/users/fbelzunc/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/fbelzunc/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "repo": {
+ "id": 539839949,
+ "node_id": "R_kgDOIC1NzQ",
+ "name": "audit-trail-plugin",
+ "full_name": "fbelzunc/audit-trail-plugin",
+ "private": false,
+ "owner": {
+ "login": "fbelzunc",
+ "id": 3898648,
+ "node_id": "MDQ6VXNlcjM4OTg2NDg=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3898648?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/fbelzunc",
+ "html_url": "https://github.com/fbelzunc",
+ "followers_url": "https://api.github.com/users/fbelzunc/followers",
+ "following_url": "https://api.github.com/users/fbelzunc/following{/other_user}",
+ "gists_url": "https://api.github.com/users/fbelzunc/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/fbelzunc/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/fbelzunc/subscriptions",
+ "organizations_url": "https://api.github.com/users/fbelzunc/orgs",
+ "repos_url": "https://api.github.com/users/fbelzunc/repos",
+ "events_url": "https://api.github.com/users/fbelzunc/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/fbelzunc/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "html_url": "https://github.com/fbelzunc/audit-trail-plugin",
+ "description": "Jenkins audit-trail plugin",
+ "fork": true,
+ "url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin",
+ "forks_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/forks",
+ "keys_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/teams",
+ "hooks_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/hooks",
+ "issue_events_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/events",
+ "assignees_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/tags",
+ "blobs_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/languages",
+ "stargazers_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/stargazers",
+ "contributors_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/contributors",
+ "subscribers_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/subscribers",
+ "subscription_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/subscription",
+ "commits_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/merges",
+ "archive_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/downloads",
+ "issues_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/labels{/name}",
+ "releases_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/deployments",
+ "created_at": "2022-09-22T06:51:59Z",
+ "updated_at": "2022-08-21T18:06:56Z",
+ "pushed_at": "2023-01-05T12:48:42Z",
+ "git_url": "git://github.com/fbelzunc/audit-trail-plugin.git",
+ "ssh_url": "git@github.com:fbelzunc/audit-trail-plugin.git",
+ "clone_url": "https://github.com/fbelzunc/audit-trail-plugin.git",
+ "svn_url": "https://github.com/fbelzunc/audit-trail-plugin",
+ "homepage": "https://wiki.jenkins.io/display/JENKINS/Audit+Trail+Plugin",
+ "size": 526,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": false,
+ "has_projects": true,
+ "has_downloads": true,
+ "has_wiki": false,
+ "has_pages": false,
+ "has_discussions": false,
+ "forks_count": 0,
+ "mirror_url": null,
+ "archived": false,
+ "disabled": false,
+ "open_issues_count": 0,
+ "license": {
+ "key": "mit",
+ "name": "MIT License",
+ "spdx_id": "MIT",
+ "url": "https://api.github.com/licenses/mit",
+ "node_id": "MDc6TGljZW5zZTEz"
+ },
+ "allow_forking": true,
+ "is_template": false,
+ "web_commit_signoff_required": false,
+ "topics": [],
+ "visibility": "public",
+ "forks": 0,
+ "open_issues": 0,
+ "watchers": 0,
+ "default_branch": "master"
+ }
+ },
+ "base": {
+ "label": "jenkinsci:master",
+ "ref": "master",
+ "sha": "b948de58ee2258e22d6d5ab7863a769ea3847c2a",
+ "user": {
+ "login": "jenkinsci",
+ "id": 107424,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjEwNzQyNA==",
+ "avatar_url": "https://avatars.githubusercontent.com/u/107424?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/jenkinsci",
+ "html_url": "https://github.com/jenkinsci",
+ "followers_url": "https://api.github.com/users/jenkinsci/followers",
+ "following_url": "https://api.github.com/users/jenkinsci/following{/other_user}",
+ "gists_url": "https://api.github.com/users/jenkinsci/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/jenkinsci/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/jenkinsci/subscriptions",
+ "organizations_url": "https://api.github.com/users/jenkinsci/orgs",
+ "repos_url": "https://api.github.com/users/jenkinsci/repos",
+ "events_url": "https://api.github.com/users/jenkinsci/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/jenkinsci/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "repo": {
+ "id": 1163429,
+ "node_id": "MDEwOlJlcG9zaXRvcnkxMTYzNDI5",
+ "name": "audit-trail-plugin",
+ "full_name": "jenkinsci/audit-trail-plugin",
+ "private": false,
+ "owner": {
+ "login": "jenkinsci",
+ "id": 107424,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjEwNzQyNA==",
+ "avatar_url": "https://avatars.githubusercontent.com/u/107424?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/jenkinsci",
+ "html_url": "https://github.com/jenkinsci",
+ "followers_url": "https://api.github.com/users/jenkinsci/followers",
+ "following_url": "https://api.github.com/users/jenkinsci/following{/other_user}",
+ "gists_url": "https://api.github.com/users/jenkinsci/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/jenkinsci/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/jenkinsci/subscriptions",
+ "organizations_url": "https://api.github.com/users/jenkinsci/orgs",
+ "repos_url": "https://api.github.com/users/jenkinsci/repos",
+ "events_url": "https://api.github.com/users/jenkinsci/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/jenkinsci/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "html_url": "https://github.com/jenkinsci/audit-trail-plugin",
+ "description": "Jenkins audit-trail plugin",
+ "fork": false,
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin",
+ "forks_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/forks",
+ "keys_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/teams",
+ "hooks_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/hooks",
+ "issue_events_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/events",
+ "assignees_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/tags",
+ "blobs_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/languages",
+ "stargazers_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/stargazers",
+ "contributors_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/contributors",
+ "subscribers_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/subscribers",
+ "subscription_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/subscription",
+ "commits_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/merges",
+ "archive_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/downloads",
+ "issues_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/labels{/name}",
+ "releases_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/deployments",
+ "created_at": "2010-12-13T05:25:45Z",
+ "updated_at": "2022-08-21T18:06:56Z",
+ "pushed_at": "2023-01-30T10:22:22Z",
+ "git_url": "git://github.com/jenkinsci/audit-trail-plugin.git",
+ "ssh_url": "git@github.com:jenkinsci/audit-trail-plugin.git",
+ "clone_url": "https://github.com/jenkinsci/audit-trail-plugin.git",
+ "svn_url": "https://github.com/jenkinsci/audit-trail-plugin",
+ "homepage": "https://wiki.jenkins.io/display/JENKINS/Audit+Trail+Plugin",
+ "size": 502,
+ "stargazers_count": 17,
+ "watchers_count": 17,
+ "language": "Java",
+ "has_issues": false,
+ "has_projects": true,
+ "has_downloads": true,
+ "has_wiki": false,
+ "has_pages": false,
+ "has_discussions": false,
+ "forks_count": 44,
+ "mirror_url": null,
+ "archived": false,
+ "disabled": false,
+ "open_issues_count": 4,
+ "license": {
+ "key": "mit",
+ "name": "MIT License",
+ "spdx_id": "MIT",
+ "url": "https://api.github.com/licenses/mit",
+ "node_id": "MDc6TGljZW5zZTEz"
+ },
+ "allow_forking": true,
+ "is_template": false,
+ "web_commit_signoff_required": false,
+ "topics": [
+ "administrative-monitor",
+ "audit",
+ "logging"
+ ],
+ "visibility": "public",
+ "forks": 44,
+ "open_issues": 4,
+ "watchers": 17,
+ "default_branch": "master"
+ }
+ },
+ "_links": {
+ "self": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96"
+ },
+ "html": {
+ "href": "https://github.com/jenkinsci/audit-trail-plugin/pull/96"
+ },
+ "issue": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/96"
+ },
+ "comments": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/96/comments"
+ },
+ "review_comments": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96/comments"
+ },
+ "review_comment": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/comments{/number}"
+ },
+ "commits": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96/commits"
+ },
+ "statuses": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/statuses/b65dc6cb57e438ebae7e372c812c498a32d9e9f0"
+ }
+ },
+ "author_association": "NONE",
+ "auto_merge": null,
+ "active_lock_reason": null
+ }
+ },
+ "public": true,
+ "created_at": "2023-01-30T10:23:31Z",
+ "org": {
+ "id": 107424,
+ "login": "jenkinsci",
+ "gravatar_id": "",
+ "url": "https://api.github.com/orgs/jenkinsci",
+ "avatar_url": "https://avatars.githubusercontent.com/u/107424?"
+ }
+ },
+ {
+ "id": "26737319903",
+ "type": "PullRequestReviewEvent",
+ "actor": {
+ "id": 9881659,
+ "login": "PierreBtz",
+ "display_login": "PierreBtz",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/PierreBtz",
+ "avatar_url": "https://avatars.githubusercontent.com/u/9881659?"
+ },
+ "repo": {
+ "id": 1163429,
+ "name": "jenkinsci/audit-trail-plugin",
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin"
+ },
+ "payload": {
+ "action": "created",
+ "review": {
+ "id": 1274870415,
+ "node_id": "PRR_kwDOABHApc5L_PqP",
+ "user": {
+ "login": "PierreBtz",
+ "id": 9881659,
+ "node_id": "MDQ6VXNlcjk4ODE2NTk=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/9881659?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/PierreBtz",
+ "html_url": "https://github.com/PierreBtz",
+ "followers_url": "https://api.github.com/users/PierreBtz/followers",
+ "following_url": "https://api.github.com/users/PierreBtz/following{/other_user}",
+ "gists_url": "https://api.github.com/users/PierreBtz/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/PierreBtz/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/PierreBtz/subscriptions",
+ "organizations_url": "https://api.github.com/users/PierreBtz/orgs",
+ "repos_url": "https://api.github.com/users/PierreBtz/repos",
+ "events_url": "https://api.github.com/users/PierreBtz/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/PierreBtz/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "body": null,
+ "commit_id": "b65dc6cb57e438ebae7e372c812c498a32d9e9f0",
+ "submitted_at": "2023-01-30T10:23:32Z",
+ "state": "commented",
+ "html_url": "https://github.com/jenkinsci/audit-trail-plugin/pull/96#pullrequestreview-1274870415",
+ "pull_request_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96",
+ "author_association": "CONTRIBUTOR",
+ "_links": {
+ "html": {
+ "href": "https://github.com/jenkinsci/audit-trail-plugin/pull/96#pullrequestreview-1274870415"
+ },
+ "pull_request": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96"
+ }
+ }
+ },
+ "pull_request": {
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96",
+ "id": 1166633695,
+ "node_id": "PR_kwDOABHApc5FiWrf",
+ "html_url": "https://github.com/jenkinsci/audit-trail-plugin/pull/96",
+ "diff_url": "https://github.com/jenkinsci/audit-trail-plugin/pull/96.diff",
+ "patch_url": "https://github.com/jenkinsci/audit-trail-plugin/pull/96.patch",
+ "issue_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/96",
+ "number": 96,
+ "state": "open",
+ "locked": false,
+ "title": "Add daily rotation logs for LogFileAuditLogger",
+ "user": {
+ "login": "fbelzunc",
+ "id": 3898648,
+ "node_id": "MDQ6VXNlcjM4OTg2NDg=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3898648?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/fbelzunc",
+ "html_url": "https://github.com/fbelzunc",
+ "followers_url": "https://api.github.com/users/fbelzunc/followers",
+ "following_url": "https://api.github.com/users/fbelzunc/following{/other_user}",
+ "gists_url": "https://api.github.com/users/fbelzunc/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/fbelzunc/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/fbelzunc/subscriptions",
+ "organizations_url": "https://api.github.com/users/fbelzunc/orgs",
+ "repos_url": "https://api.github.com/users/fbelzunc/repos",
+ "events_url": "https://api.github.com/users/fbelzunc/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/fbelzunc/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "body": "The current PR adds the functionality of rotating logs daily instead of per file size.\r\n\r\nThis is very useful in case you are saving audit logs for auditing purposes as you have a file per day that represents the changes performed on that specific day. You could then send them to an S3 bucket for example. \r\n\r\nThe files will be created in the specified configured location `Log Location: /tmp/audit-trail-logs/audit.log` and will create files like the ones below. Adding at the end of the specified file a data timestamp.\r\n\r\n```\r\naudit.log-2022-12-16\r\naudit.log-2022-12-15\r\naudit.log-2022-12-14\r\n```\r\n\r\nCC @chikitulfo\r\n\r\n\r\n\r\n- [X] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!\r\n- [X] Ensure that the pull request title represents the desired changelog entry\r\n- [X] Please describe what you did\r\n- [ ] Link to relevant issues in GitHub or Jira\r\n- [ ] Link to relevant pull requests, esp. upstream and downstream changes\r\n- [X] Ensure you have provided tests - that demonstrates feature works or fixes the issue\r\n\r\n\r\n",
+ "created_at": "2022-12-15T11:28:13Z",
+ "updated_at": "2023-01-30T10:23:32Z",
+ "closed_at": null,
+ "merged_at": null,
+ "merge_commit_sha": "eea7c192fecdbb91e263890a7c5ca0610ea8245d",
+ "assignee": null,
+ "assignees": [],
+ "requested_reviewers": [],
+ "requested_teams": [],
+ "labels": [],
+ "milestone": null,
+ "draft": false,
+ "commits_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96/commits",
+ "review_comments_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96/comments",
+ "review_comment_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/comments{/number}",
+ "comments_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/96/comments",
+ "statuses_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/statuses/b65dc6cb57e438ebae7e372c812c498a32d9e9f0",
+ "head": {
+ "label": "fbelzunc:daily-rotation",
+ "ref": "daily-rotation",
+ "sha": "b65dc6cb57e438ebae7e372c812c498a32d9e9f0",
+ "user": {
+ "login": "fbelzunc",
+ "id": 3898648,
+ "node_id": "MDQ6VXNlcjM4OTg2NDg=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3898648?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/fbelzunc",
+ "html_url": "https://github.com/fbelzunc",
+ "followers_url": "https://api.github.com/users/fbelzunc/followers",
+ "following_url": "https://api.github.com/users/fbelzunc/following{/other_user}",
+ "gists_url": "https://api.github.com/users/fbelzunc/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/fbelzunc/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/fbelzunc/subscriptions",
+ "organizations_url": "https://api.github.com/users/fbelzunc/orgs",
+ "repos_url": "https://api.github.com/users/fbelzunc/repos",
+ "events_url": "https://api.github.com/users/fbelzunc/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/fbelzunc/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "repo": {
+ "id": 539839949,
+ "node_id": "R_kgDOIC1NzQ",
+ "name": "audit-trail-plugin",
+ "full_name": "fbelzunc/audit-trail-plugin",
+ "private": false,
+ "owner": {
+ "login": "fbelzunc",
+ "id": 3898648,
+ "node_id": "MDQ6VXNlcjM4OTg2NDg=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3898648?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/fbelzunc",
+ "html_url": "https://github.com/fbelzunc",
+ "followers_url": "https://api.github.com/users/fbelzunc/followers",
+ "following_url": "https://api.github.com/users/fbelzunc/following{/other_user}",
+ "gists_url": "https://api.github.com/users/fbelzunc/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/fbelzunc/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/fbelzunc/subscriptions",
+ "organizations_url": "https://api.github.com/users/fbelzunc/orgs",
+ "repos_url": "https://api.github.com/users/fbelzunc/repos",
+ "events_url": "https://api.github.com/users/fbelzunc/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/fbelzunc/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "html_url": "https://github.com/fbelzunc/audit-trail-plugin",
+ "description": "Jenkins audit-trail plugin",
+ "fork": true,
+ "url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin",
+ "forks_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/forks",
+ "keys_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/teams",
+ "hooks_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/hooks",
+ "issue_events_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/events",
+ "assignees_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/tags",
+ "blobs_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/languages",
+ "stargazers_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/stargazers",
+ "contributors_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/contributors",
+ "subscribers_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/subscribers",
+ "subscription_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/subscription",
+ "commits_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/merges",
+ "archive_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/downloads",
+ "issues_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/labels{/name}",
+ "releases_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/fbelzunc/audit-trail-plugin/deployments",
+ "created_at": "2022-09-22T06:51:59Z",
+ "updated_at": "2022-08-21T18:06:56Z",
+ "pushed_at": "2023-01-05T12:48:42Z",
+ "git_url": "git://github.com/fbelzunc/audit-trail-plugin.git",
+ "ssh_url": "git@github.com:fbelzunc/audit-trail-plugin.git",
+ "clone_url": "https://github.com/fbelzunc/audit-trail-plugin.git",
+ "svn_url": "https://github.com/fbelzunc/audit-trail-plugin",
+ "homepage": "https://wiki.jenkins.io/display/JENKINS/Audit+Trail+Plugin",
+ "size": 526,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": false,
+ "has_projects": true,
+ "has_downloads": true,
+ "has_wiki": false,
+ "has_pages": false,
+ "has_discussions": false,
+ "forks_count": 0,
+ "mirror_url": null,
+ "archived": false,
+ "disabled": false,
+ "open_issues_count": 0,
+ "license": {
+ "key": "mit",
+ "name": "MIT License",
+ "spdx_id": "MIT",
+ "url": "https://api.github.com/licenses/mit",
+ "node_id": "MDc6TGljZW5zZTEz"
+ },
+ "allow_forking": true,
+ "is_template": false,
+ "web_commit_signoff_required": false,
+ "topics": [],
+ "visibility": "public",
+ "forks": 0,
+ "open_issues": 0,
+ "watchers": 0,
+ "default_branch": "master"
+ }
+ },
+ "base": {
+ "label": "jenkinsci:master",
+ "ref": "master",
+ "sha": "b948de58ee2258e22d6d5ab7863a769ea3847c2a",
+ "user": {
+ "login": "jenkinsci",
+ "id": 107424,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjEwNzQyNA==",
+ "avatar_url": "https://avatars.githubusercontent.com/u/107424?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/jenkinsci",
+ "html_url": "https://github.com/jenkinsci",
+ "followers_url": "https://api.github.com/users/jenkinsci/followers",
+ "following_url": "https://api.github.com/users/jenkinsci/following{/other_user}",
+ "gists_url": "https://api.github.com/users/jenkinsci/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/jenkinsci/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/jenkinsci/subscriptions",
+ "organizations_url": "https://api.github.com/users/jenkinsci/orgs",
+ "repos_url": "https://api.github.com/users/jenkinsci/repos",
+ "events_url": "https://api.github.com/users/jenkinsci/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/jenkinsci/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "repo": {
+ "id": 1163429,
+ "node_id": "MDEwOlJlcG9zaXRvcnkxMTYzNDI5",
+ "name": "audit-trail-plugin",
+ "full_name": "jenkinsci/audit-trail-plugin",
+ "private": false,
+ "owner": {
+ "login": "jenkinsci",
+ "id": 107424,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjEwNzQyNA==",
+ "avatar_url": "https://avatars.githubusercontent.com/u/107424?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/jenkinsci",
+ "html_url": "https://github.com/jenkinsci",
+ "followers_url": "https://api.github.com/users/jenkinsci/followers",
+ "following_url": "https://api.github.com/users/jenkinsci/following{/other_user}",
+ "gists_url": "https://api.github.com/users/jenkinsci/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/jenkinsci/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/jenkinsci/subscriptions",
+ "organizations_url": "https://api.github.com/users/jenkinsci/orgs",
+ "repos_url": "https://api.github.com/users/jenkinsci/repos",
+ "events_url": "https://api.github.com/users/jenkinsci/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/jenkinsci/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "html_url": "https://github.com/jenkinsci/audit-trail-plugin",
+ "description": "Jenkins audit-trail plugin",
+ "fork": false,
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin",
+ "forks_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/forks",
+ "keys_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/teams",
+ "hooks_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/hooks",
+ "issue_events_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/events",
+ "assignees_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/tags",
+ "blobs_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/languages",
+ "stargazers_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/stargazers",
+ "contributors_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/contributors",
+ "subscribers_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/subscribers",
+ "subscription_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/subscription",
+ "commits_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/merges",
+ "archive_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/downloads",
+ "issues_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/labels{/name}",
+ "releases_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/deployments",
+ "created_at": "2010-12-13T05:25:45Z",
+ "updated_at": "2022-08-21T18:06:56Z",
+ "pushed_at": "2023-01-30T10:22:22Z",
+ "git_url": "git://github.com/jenkinsci/audit-trail-plugin.git",
+ "ssh_url": "git@github.com:jenkinsci/audit-trail-plugin.git",
+ "clone_url": "https://github.com/jenkinsci/audit-trail-plugin.git",
+ "svn_url": "https://github.com/jenkinsci/audit-trail-plugin",
+ "homepage": "https://wiki.jenkins.io/display/JENKINS/Audit+Trail+Plugin",
+ "size": 502,
+ "stargazers_count": 17,
+ "watchers_count": 17,
+ "language": "Java",
+ "has_issues": false,
+ "has_projects": true,
+ "has_downloads": true,
+ "has_wiki": false,
+ "has_pages": false,
+ "has_discussions": false,
+ "forks_count": 44,
+ "mirror_url": null,
+ "archived": false,
+ "disabled": false,
+ "open_issues_count": 4,
+ "license": {
+ "key": "mit",
+ "name": "MIT License",
+ "spdx_id": "MIT",
+ "url": "https://api.github.com/licenses/mit",
+ "node_id": "MDc6TGljZW5zZTEz"
+ },
+ "allow_forking": true,
+ "is_template": false,
+ "web_commit_signoff_required": false,
+ "topics": [
+ "administrative-monitor",
+ "audit",
+ "logging"
+ ],
+ "visibility": "public",
+ "forks": 44,
+ "open_issues": 4,
+ "watchers": 17,
+ "default_branch": "master"
+ }
+ },
+ "_links": {
+ "self": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96"
+ },
+ "html": {
+ "href": "https://github.com/jenkinsci/audit-trail-plugin/pull/96"
+ },
+ "issue": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/96"
+ },
+ "comments": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/issues/96/comments"
+ },
+ "review_comments": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96/comments"
+ },
+ "review_comment": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/comments{/number}"
+ },
+ "commits": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/96/commits"
+ },
+ "statuses": {
+ "href": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/statuses/b65dc6cb57e438ebae7e372c812c498a32d9e9f0"
+ }
+ },
+ "author_association": "NONE",
+ "auto_merge": null,
+ "active_lock_reason": null
+ }
+ },
+ "public": true,
+ "created_at": "2023-01-30T10:23:32Z",
+ "org": {
+ "id": 107424,
+ "login": "jenkinsci",
+ "gravatar_id": "",
+ "url": "https://api.github.com/orgs/jenkinsci",
+ "avatar_url": "https://avatars.githubusercontent.com/u/107424?"
+ }
+ },
+ {
+ "id": "26737288201",
+ "type": "PushEvent",
+ "actor": {
+ "id": 9881659,
+ "login": "PierreBtz",
+ "display_login": "PierreBtz",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/PierreBtz",
+ "avatar_url": "https://avatars.githubusercontent.com/u/9881659?"
+ },
+ "repo": {
+ "id": 1163429,
+ "name": "jenkinsci/audit-trail-plugin",
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin"
+ },
+ "payload": {
+ "push_id": 12443836975,
+ "size": 1,
+ "distinct_size": 1,
+ "ref": "refs/heads/PierreBtz-patch-1",
+ "head": "01c9283a6ee5770d8b10567da5d67ceae0e67b73",
+ "before": "6ed85073af7d3253ed941f7d23539de38551c124",
+ "commits": [
+ {
+ "sha": "01c9283a6ee5770d8b10567da5d67ceae0e67b73",
+ "author": {
+ "email": "pibeitz@gmail.com",
+ "name": "Pierre Beitz"
+ },
+ "message": "Replace unsupported tt tags with code",
+ "distinct": true,
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/commits/01c9283a6ee5770d8b10567da5d67ceae0e67b73"
+ }
+ ]
+ },
+ "public": true,
+ "created_at": "2023-01-30T10:22:20Z",
+ "org": {
+ "id": 107424,
+ "login": "jenkinsci",
+ "gravatar_id": "",
+ "url": "https://api.github.com/orgs/jenkinsci",
+ "avatar_url": "https://avatars.githubusercontent.com/u/107424?"
+ }
+ },
+ {
+ "id": "26737157600",
+ "type": "PullRequestReviewCommentEvent",
+ "actor": {
+ "id": 9881659,
+ "login": "PierreBtz",
+ "display_login": "PierreBtz",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/PierreBtz",
+ "avatar_url": "https://avatars.githubusercontent.com/u/9881659?"
+ },
+ "repo": {
+ "id": 1163429,
+ "name": "jenkinsci/audit-trail-plugin",
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin"
+ },
+ "payload": {
+ "action": "created",
+ "comment": {
+ "url": "https://api.github.com/repos/jenkinsci/audit-trail-plugin/pulls/comments/1090421259",
+ "pull_request_review_id": 1274844118,
+ "id": 1090421259,
+ "node_id": "PRRC_kwDOABHApc5A_oIL",
+ "diff_hunk": "@@ -0,0 +1,180 @@\n+package hudson.plugins.audit_trail;\n+\n+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;\n+import hudson.Extension;\n+import hudson.model.Descriptor;\n+import org.apache.commons.io.FileUtils;\n+import org.apache.commons.io.FilenameUtils;\n+import org.apache.commons.io.filefilter.DirectoryFileFilter;\n+import org.apache.commons.io.filefilter.RegexFileFilter;\n+import org.kohsuke.stapler.DataBoundConstructor;\n+\n+import java.io.File;\n+import java.io.IOException;\n+import java.nio.file.Path;\n+import java.nio.file.Paths;\n+import java.time.Duration;\n+import java.time.Instant;\n+import java.time.ZoneId;\n+import java.time.ZonedDateTime;\n+import java.time.format.DateTimeFormatter;\n+import java.time.temporal.ChronoUnit;\n+import java.util.Collection;\n+import java.util.List;\n+import java.util.logging.FileHandler;\n+import java.util.logging.Level;\n+import java.util.logging.Logger;\n+import java.util.regex.Matcher;\n+import java.util.regex.Pattern;\n+import java.util.stream.Collectors;\n+\n+import static org.apache.commons.io.comparator.LastModifiedFileComparator.LASTMODIFIED_REVERSE;\n+\n+public class LogFileDailyRotationAuditLogger extends AbstractLogFileAuditLogger {\n+\n+ private static final Logger LOGGER = Logger.getLogger(LogFileDailyRotationAuditLogger.class.getName());\n+ static final String DAILY_ROTATING_FILE_REGEX_PATTERN = \"-[0-9]{4}-[0-9]{2}-[0-9]{2}\" + \".*\" + \"(? files = FileUtils.listFiles(new File(directoryPath.toString()), new RegexFileFilter(\".*\" + FilenameUtils.getName(basePattern.toString()) + DAILY_ROTATING_FILE_REGEX_PATTERN), DirectoryFileFilter.DIRECTORY);\n+ if (files.size() > 0) {\n+ List+ * Consumer must call {@link GHRepositoryVariable.Creator#done()} to commit changes. + * + * @param repository + * the repository in which the variable will be created. + * @return a {@link GHRepositoryVariable.Creator} + * @throws IOException + * the io exception + */ + @BetaApi + static GHRepositoryVariable.Creator create(GHRepository repository) throws IOException { + return new GHRepositoryVariable.Creator(repository); + } + + /** + * Delete this variable from the repository. + * + * @throws IOException + * the io exception + */ + public void delete() throws IOException { + root().createRequest().method("DELETE").withUrlPath(getUrl().concat(SLASH).concat(name)).send(); + } + + /** + * Begins a single property update. + * + * @return a {@link GHRepositoryVariable.Setter} + */ + @BetaApi + public GHRepositoryVariable.Setter set() { + return new GHRepositoryVariable.Setter(this); + } + + /** + * A {@link GHRepositoryVariableBuilder} that updates a single property per request + *
+ * {@link #done()} is called automatically after the property is set.
+ */
+ @BetaApi
+ public static class Setter extends GHRepositoryVariableBuilder
+ * Consumer must call {@link #done()} to create the new instance.
+ */
+ @BetaApi
+ public static class Creator extends GHRepositoryVariableBuilder
+ * the type parameter
+ */
+public class GHRepositoryVariableBuilder extends AbstractBuilder intermediateReturnType,
+ @Nonnull GitHub root,
+ @CheckForNull GHRepositoryVariable baseInstance) {
+ super(GHRepositoryVariable.class, intermediateReturnType, root, baseInstance);
+ if (baseInstance != null) {
+ requester.with("name", baseInstance.getName());
+ requester.with("value", baseInstance.getValue());
+ }
+ }
+
+ /**
+ * Name.
+ *
+ * @param value
+ * the value
+ * @return the s
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ @Nonnull
+ @BetaApi
+ public S name(String value) throws IOException {
+ return with("name", value);
+ }
+
+ /**
+ * Name.
+ *
+ * @param value
+ * the value
+ * @return the s
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ @Nonnull
+ @BetaApi
+ public S value(String value) throws IOException {
+ return with("value", value);
+ }
+}
diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java
index da4cb57ff9..d9bd5165d7 100644
--- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java
+++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java
@@ -2,6 +2,7 @@
import com.fasterxml.jackson.databind.JsonMappingException;
import org.apache.commons.io.IOUtils;
+import org.junit.Assert;
import org.junit.Test;
import org.kohsuke.github.GHCheckRun.Conclusion;
import org.kohsuke.github.GHOrganization.RepositoryRole;
@@ -1596,6 +1597,52 @@ public void testRepoActionVariable() throws Exception {
}
/**
+ * Test create repo action variable.
+ *
+ * @throws IOException
+ * the exception
+ */
+ @Test
+ public void testCreateRepoActionVariable() throws IOException {
+ GHRepository repository = getRepository();
+ repository.createVariable("MYNEWVARIABLE", "mynewvalue");
+ GHRepositoryVariable variable = repository.getVariable("mynewvariable");
+ assertThat(variable.getName(), is("MYNEWVARIABLE"));
+ assertThat(variable.getValue(), is("mynewvalue"));
+ }
+
+ /**
+ * Test update repo action variable.
+ *
+ * @throws IOException
+ * the exception
+ */
+ @Test
+ public void testUpdateRepoActionVariable() throws IOException {
+ GHRepository repository = getRepository();
+ GHRepositoryVariable variable = repository.getVariable("MYNEWVARIABLE");
+ variable.set().value("myupdatevalue");
+ variable = repository.getVariable("MYNEWVARIABLE");
+ assertThat(variable.getValue(), is("myupdatevalue"));
+ }
+
+ /**
+ * Test delete repo action variable.
+ *
+ * @throws IOException
+ * the exception
+ */
+ @Test
+ public void testDeleteRepoActionVariable() throws IOException {
+ GHRepository repository = getRepository();
+ GHRepositoryVariable variable = repository.getVariable("mynewvariable");
+ variable.delete();
+ Assert.assertThrows(GHFileNotFoundException.class, () -> repository.getVariable("mynewvariable"));
+ }
+
+ /**
+ * Test demoing the issue with a user having the maintain permission on a repository.
+ *
* Test checking the permission fallback mechanism in case the Github API changes. The test was recorded at a time a
* new permission was added by mistake. If a re-recording it is needed, you'll like have to manually edit the
* generated mocks to get a non existing permission See
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/__files/orgs_hub4j-test-org-2.json
new file mode 100644
index 0000000000..25c602bdf3
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/__files/orgs_hub4j-test-org-2.json
@@ -0,0 +1,58 @@
+{
+ "login": "hub4j-test-org",
+ "id": 59470614,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjU5NDcwNjE0",
+ "url": "https://api.github.com/orgs/hub4j-test-org",
+ "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/orgs/hub4j-test-org/events",
+ "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks",
+ "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues",
+ "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}",
+ "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59470614?v=4",
+ "description": null,
+ "is_verified": false,
+ "has_organization_projects": true,
+ "has_repository_projects": true,
+ "public_repos": 1,
+ "public_gists": 0,
+ "followers": 9,
+ "following": 0,
+ "html_url": "https://github.com/hub4j-test-org",
+ "created_at": "2020-01-03T09:09:41Z",
+ "updated_at": "2023-05-15T08:11:52Z",
+ "type": "Organization",
+ "total_private_repos": 1630,
+ "owned_private_repos": 1671,
+ "private_gists": 0,
+ "disk_usage": 4872624,
+ "collaborators": 75,
+ "billing_email": "garridobarrera@gmail.com",
+ "default_repository_permission": "none",
+ "members_can_create_repositories": false,
+ "two_factor_requirement_enabled": false,
+ "members_allowed_repository_creation_type": "none",
+ "members_can_create_public_repositories": false,
+ "members_can_create_private_repositories": false,
+ "members_can_create_internal_repositories": false,
+ "members_can_create_pages": true,
+ "members_can_fork_private_repositories": false,
+ "web_commit_signoff_required": false,
+ "members_can_create_public_pages": true,
+ "members_can_create_private_pages": true,
+ "plan": {
+ "name": "enterprise",
+ "space": 976562499,
+ "private_repos": 999999,
+ "filled_seats": 5153,
+ "seats": 5664
+ },
+ "advanced_security_enabled_for_new_repositories": false,
+ "dependabot_alerts_enabled_for_new_repositories": false,
+ "dependabot_security_updates_enabled_for_new_repositories": false,
+ "dependency_graph_enabled_for_new_repositories": false,
+ "secret_scanning_enabled_for_new_repositories": false,
+ "secret_scanning_push_protection_enabled_for_new_repositories": false,
+ "secret_scanning_push_protection_custom_link_enabled": false,
+ "secret_scanning_push_protection_custom_link": null
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json
new file mode 100644
index 0000000000..7aae05a540
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json
@@ -0,0 +1,143 @@
+{
+ "id": 649619181,
+ "node_id": "R_kgDOJrhm7Q",
+ "name": "github-api",
+ "full_name": "hub4j-test-org/github-api",
+ "private": true,
+ "owner": {
+ "login": "hub4j-test-org",
+ "id": 59470614,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjU5NDcwNjE0",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59470614?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/hub4j-test-org",
+ "html_url": "https://github.com/hub4j-test-org",
+ "followers_url": "https://api.github.com/users/hub4j-test-org/followers",
+ "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
+ "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
+ "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
+ "repos_url": "https://api.github.com/users/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "html_url": "https://github.com/hub4j-test-org/github-api",
+ "description": "github-api",
+ "fork": false,
+ "url": "https://api.github.com/repos/hub4j-test-org/github-api",
+ "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks",
+ "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams",
+ "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks",
+ "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events",
+ "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags",
+ "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages",
+ "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers",
+ "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors",
+ "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers",
+ "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription",
+ "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges",
+ "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads",
+ "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}",
+ "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments",
+ "created_at": "2023-06-05T09:18:13Z",
+ "updated_at": "2023-06-05T09:18:21Z",
+ "pushed_at": "2023-06-05T09:18:39Z",
+ "git_url": "git://github.com/hub4j-test-org/github-api.git",
+ "ssh_url": "git@github.com:hub4j-test-org/github-api.git",
+ "clone_url": "https://github.com/hub4j-test-org/github-api.git",
+ "svn_url": "https://github.com/hub4j-test-org/github-api",
+ "homepage": null,
+ "size": 7,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_projects": true,
+ "has_downloads": true,
+ "has_wiki": true,
+ "has_pages": false,
+ "has_discussions": false,
+ "forks_count": 0,
+ "mirror_url": null,
+ "archived": false,
+ "disabled": false,
+ "open_issues_count": 0,
+ "license": null,
+ "allow_forking": false,
+ "is_template": false,
+ "web_commit_signoff_required": false,
+ "topics": [
+ "topiclanguage"
+ ],
+ "visibility": "private",
+ "forks": 0,
+ "open_issues": 0,
+ "watchers": 0,
+ "default_branch": "develop",
+ "permissions": {
+ "admin": true,
+ "maintain": true,
+ "push": true,
+ "triage": true,
+ "pull": true
+ },
+ "temp_clone_token": "ABVSGFWK3NHJBUL36IBMZGDEPX2UC",
+ "allow_squash_merge": true,
+ "allow_merge_commit": true,
+ "allow_rebase_merge": true,
+ "allow_auto_merge": false,
+ "delete_branch_on_merge": true,
+ "allow_update_branch": false,
+ "use_squash_pr_title_as_default": false,
+ "squash_merge_commit_message": "COMMIT_MESSAGES",
+ "squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
+ "merge_commit_message": "PR_TITLE",
+ "merge_commit_title": "MERGE_MESSAGE",
+ "organization": {
+ "login": "hub4j-test-org",
+ "id": 59470614,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjU5NDcwNjE0",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59470614?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/hub4j-test-org",
+ "html_url": "https://github.com/hub4j-test-org",
+ "followers_url": "https://api.github.com/users/hub4j-test-org/followers",
+ "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
+ "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
+ "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
+ "repos_url": "https://api.github.com/users/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "network_count": 0,
+ "subscribers_count": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/__files/user-1.json
new file mode 100644
index 0000000000..08775b9cda
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/__files/user-1.json
@@ -0,0 +1,46 @@
+{
+ "login": "garridobarrera",
+ "id": 7021334,
+ "node_id": "MDQ6VXNlcjcwMjEzMzQ=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/7021334?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/garridobarrera",
+ "html_url": "https://github.com/garridobarrera",
+ "followers_url": "https://api.github.com/users/garridobarrera/followers",
+ "following_url": "https://api.github.com/users/garridobarrera/following{/other_user}",
+ "gists_url": "https://api.github.com/users/garridobarrera/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/garridobarrera/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/garridobarrera/subscriptions",
+ "organizations_url": "https://api.github.com/users/garridobarrera/orgs",
+ "repos_url": "https://api.github.com/users/garridobarrera/repos",
+ "events_url": "https://api.github.com/users/garridobarrera/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/garridobarrera/received_events",
+ "type": "User",
+ "site_admin": false,
+ "name": "José Manuel Garrido Barrera",
+ "company": "personal",
+ "blog": "",
+ "location": null,
+ "email": "garridobarrera@gmail.com",
+ "hireable": null,
+ "bio": null,
+ "twitter_username": null,
+ "public_repos": 11,
+ "public_gists": 0,
+ "followers": 3,
+ "following": 3,
+ "created_at": "2014-03-21T10:37:00Z",
+ "updated_at": "2023-03-13T11:32:23Z",
+ "private_gists": 0,
+ "total_private_repos": 2,
+ "owned_private_repos": 2,
+ "disk_usage": 5935,
+ "collaborators": 1,
+ "two_factor_authentication": true,
+ "plan": {
+ "name": "free",
+ "space": 976562499,
+ "collaborators": 0,
+ "private_repos": 10000
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/orgs_hub4j-test-org-2.json
new file mode 100644
index 0000000000..f318bc0c90
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/orgs_hub4j-test-org-2.json
@@ -0,0 +1,50 @@
+{
+ "id": "627a7493-f294-4a21-a6ef-088614dc0a2b",
+ "name": "orgs_hub4j-test-org",
+ "request": {
+ "url": "/orgs/hub4j-test-org",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "orgs_hub4j-test-org-2.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:41:25 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"46a40cb19e416c1d2dce19a8db11c0f32801a98a0c629dfa70fd25358454e97d\"",
+ "Last-Modified": "Mon, 15 May 2023 08:11:52 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4908",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "92",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC83:0BAC:1A459532:1A85271D:647DF414"
+ }
+ },
+ "uuid": "627a7493-f294-4a21-a6ef-088614dc0a2b",
+ "persistent": true,
+ "insertionIndex": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json
new file mode 100644
index 0000000000..c053aae44b
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json
@@ -0,0 +1,50 @@
+{
+ "id": "587b0fb2-3a43-490f-87f3-9efbee755d6c",
+ "name": "repos_hub4j-test-org_github-api",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "repos_hub4j-test-org_github-api-3.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:41:25 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"ad2ec095079899332f528baec4441d362d0e6e5594b29ff93423e00ce1f5350b\"",
+ "Last-Modified": "Mon, 05 Jun 2023 09:18:21 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "repo",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4907",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "93",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC84:10E3E:13C847C2:13FF891F:647DF415"
+ }
+ },
+ "uuid": "587b0fb2-3a43-490f-87f3-9efbee755d6c",
+ "persistent": true,
+ "insertionIndex": 3
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables-4.json
new file mode 100644
index 0000000000..f26779ad34
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables-4.json
@@ -0,0 +1,56 @@
+{
+ "id": "d4b69248-b4cb-4f60-a649-1c78718bc875",
+ "name": "repos_hub4j-test-org_github-api_actions_variables",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api/actions/variables",
+ "method": "POST",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ },
+ "bodyPatterns": [
+ {
+ "equalToJson": "{\"name\":\"MYNEWVARIABLE\",\"value\":\"mynewvalue\"}",
+ "ignoreArrayOrder": true,
+ "ignoreExtraElements": false
+ }
+ ]
+ },
+ "response": {
+ "status": 201,
+ "body": "{}",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:41:26 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "\"6ea51f14160aa76cc240aa74ee94683a5648fedf8df8670960086d035ede1436\"",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4906",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "94",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC85:8B14:10B524FC:10E4767F:647DF415"
+ }
+ },
+ "uuid": "d4b69248-b4cb-4f60-a649-1c78718bc875",
+ "persistent": true,
+ "insertionIndex": 4
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-5.json
new file mode 100644
index 0000000000..2fe5ed18ed
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-5.json
@@ -0,0 +1,49 @@
+{
+ "id": "0deec025-c7ce-4a95-863a-58c8bf52fe42",
+ "name": "repos_hub4j-test-org_github-api_actions_variables_mynewvariable",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api/actions/variables/mynewvariable",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "body": "{\"name\":\"MYNEWVARIABLE\",\"value\":\"mynewvalue\",\"created_at\":\"2023-06-05T14:41:26Z\",\"updated_at\":\"2023-06-05T14:41:26Z\"}",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:41:26 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"ce64a844db6abf4edd4b3d80a8d2a1b698a7f6b39ddd029a703ff5e74688bf50\"",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4905",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "95",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC86:50C2:1565624E:15A1C963:647DF416"
+ }
+ },
+ "uuid": "0deec025-c7ce-4a95-863a-58c8bf52fe42",
+ "persistent": true,
+ "insertionIndex": 5
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/user-1.json
new file mode 100644
index 0000000000..b9946106e7
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testCreateRepoActionVariable/mappings/user-1.json
@@ -0,0 +1,50 @@
+{
+ "id": "9ea576f1-c6ba-427c-9cb8-4cbc343db0f7",
+ "name": "user",
+ "request": {
+ "url": "/user",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "user-1.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:41:23 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"72b451bc289e83190862630ea2754b45789caedda90121a9584bce45fe6830c8\"",
+ "Last-Modified": "Mon, 13 Mar 2023 11:32:23 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4910",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "90",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC81:0E02:19BD9C64:19FD2D1E:647DF413"
+ }
+ },
+ "uuid": "9ea576f1-c6ba-427c-9cb8-4cbc343db0f7",
+ "persistent": true,
+ "insertionIndex": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/__files/orgs_hub4j-test-org-2.json
new file mode 100644
index 0000000000..25c602bdf3
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/__files/orgs_hub4j-test-org-2.json
@@ -0,0 +1,58 @@
+{
+ "login": "hub4j-test-org",
+ "id": 59470614,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjU5NDcwNjE0",
+ "url": "https://api.github.com/orgs/hub4j-test-org",
+ "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/orgs/hub4j-test-org/events",
+ "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks",
+ "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues",
+ "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}",
+ "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59470614?v=4",
+ "description": null,
+ "is_verified": false,
+ "has_organization_projects": true,
+ "has_repository_projects": true,
+ "public_repos": 1,
+ "public_gists": 0,
+ "followers": 9,
+ "following": 0,
+ "html_url": "https://github.com/hub4j-test-org",
+ "created_at": "2020-01-03T09:09:41Z",
+ "updated_at": "2023-05-15T08:11:52Z",
+ "type": "Organization",
+ "total_private_repos": 1630,
+ "owned_private_repos": 1671,
+ "private_gists": 0,
+ "disk_usage": 4872624,
+ "collaborators": 75,
+ "billing_email": "garridobarrera@gmail.com",
+ "default_repository_permission": "none",
+ "members_can_create_repositories": false,
+ "two_factor_requirement_enabled": false,
+ "members_allowed_repository_creation_type": "none",
+ "members_can_create_public_repositories": false,
+ "members_can_create_private_repositories": false,
+ "members_can_create_internal_repositories": false,
+ "members_can_create_pages": true,
+ "members_can_fork_private_repositories": false,
+ "web_commit_signoff_required": false,
+ "members_can_create_public_pages": true,
+ "members_can_create_private_pages": true,
+ "plan": {
+ "name": "enterprise",
+ "space": 976562499,
+ "private_repos": 999999,
+ "filled_seats": 5153,
+ "seats": 5664
+ },
+ "advanced_security_enabled_for_new_repositories": false,
+ "dependabot_alerts_enabled_for_new_repositories": false,
+ "dependabot_security_updates_enabled_for_new_repositories": false,
+ "dependency_graph_enabled_for_new_repositories": false,
+ "secret_scanning_enabled_for_new_repositories": false,
+ "secret_scanning_push_protection_enabled_for_new_repositories": false,
+ "secret_scanning_push_protection_custom_link_enabled": false,
+ "secret_scanning_push_protection_custom_link": null
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json
new file mode 100644
index 0000000000..e691789a9a
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json
@@ -0,0 +1,143 @@
+{
+ "id": 649619181,
+ "node_id": "R_kgDOJrhm7Q",
+ "name": "github-api",
+ "full_name": "hub4j-test-org/github-api",
+ "private": true,
+ "owner": {
+ "login": "hub4j-test-org",
+ "id": 59470614,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjU5NDcwNjE0",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59470614?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/hub4j-test-org",
+ "html_url": "https://github.com/hub4j-test-org",
+ "followers_url": "https://api.github.com/users/hub4j-test-org/followers",
+ "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
+ "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
+ "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
+ "repos_url": "https://api.github.com/users/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "html_url": "https://github.com/hub4j-test-org/github-api",
+ "description": "github-api",
+ "fork": false,
+ "url": "https://api.github.com/repos/hub4j-test-org/github-api",
+ "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks",
+ "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams",
+ "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks",
+ "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events",
+ "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags",
+ "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages",
+ "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers",
+ "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors",
+ "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers",
+ "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription",
+ "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges",
+ "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads",
+ "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}",
+ "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments",
+ "created_at": "2023-06-05T09:18:13Z",
+ "updated_at": "2023-06-05T09:18:21Z",
+ "pushed_at": "2023-06-05T09:18:39Z",
+ "git_url": "git://github.com/hub4j-test-org/github-api.git",
+ "ssh_url": "git@github.com:hub4j-test-org/github-api.git",
+ "clone_url": "https://github.com/hub4j-test-org/github-api.git",
+ "svn_url": "https://github.com/hub4j-test-org/github-api",
+ "homepage": null,
+ "size": 7,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_projects": true,
+ "has_downloads": true,
+ "has_wiki": true,
+ "has_pages": false,
+ "has_discussions": false,
+ "forks_count": 0,
+ "mirror_url": null,
+ "archived": false,
+ "disabled": false,
+ "open_issues_count": 0,
+ "license": null,
+ "allow_forking": false,
+ "is_template": false,
+ "web_commit_signoff_required": false,
+ "topics": [
+ "topiclanguage"
+ ],
+ "visibility": "private",
+ "forks": 0,
+ "open_issues": 0,
+ "watchers": 0,
+ "default_branch": "develop",
+ "permissions": {
+ "admin": true,
+ "maintain": true,
+ "push": true,
+ "triage": true,
+ "pull": true
+ },
+ "temp_clone_token": "ABVSGFSU5FJS5LWWZ543MBTEPX2XS",
+ "allow_squash_merge": true,
+ "allow_merge_commit": true,
+ "allow_rebase_merge": true,
+ "allow_auto_merge": false,
+ "delete_branch_on_merge": true,
+ "allow_update_branch": false,
+ "use_squash_pr_title_as_default": false,
+ "squash_merge_commit_message": "COMMIT_MESSAGES",
+ "squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
+ "merge_commit_message": "PR_TITLE",
+ "merge_commit_title": "MERGE_MESSAGE",
+ "organization": {
+ "login": "hub4j-test-org",
+ "id": 59470614,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjU5NDcwNjE0",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59470614?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/hub4j-test-org",
+ "html_url": "https://github.com/hub4j-test-org",
+ "followers_url": "https://api.github.com/users/hub4j-test-org/followers",
+ "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
+ "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
+ "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
+ "repos_url": "https://api.github.com/users/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "network_count": 0,
+ "subscribers_count": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/__files/user-1.json
new file mode 100644
index 0000000000..08775b9cda
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/__files/user-1.json
@@ -0,0 +1,46 @@
+{
+ "login": "garridobarrera",
+ "id": 7021334,
+ "node_id": "MDQ6VXNlcjcwMjEzMzQ=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/7021334?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/garridobarrera",
+ "html_url": "https://github.com/garridobarrera",
+ "followers_url": "https://api.github.com/users/garridobarrera/followers",
+ "following_url": "https://api.github.com/users/garridobarrera/following{/other_user}",
+ "gists_url": "https://api.github.com/users/garridobarrera/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/garridobarrera/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/garridobarrera/subscriptions",
+ "organizations_url": "https://api.github.com/users/garridobarrera/orgs",
+ "repos_url": "https://api.github.com/users/garridobarrera/repos",
+ "events_url": "https://api.github.com/users/garridobarrera/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/garridobarrera/received_events",
+ "type": "User",
+ "site_admin": false,
+ "name": "José Manuel Garrido Barrera",
+ "company": "personal",
+ "blog": "",
+ "location": null,
+ "email": "garridobarrera@gmail.com",
+ "hireable": null,
+ "bio": null,
+ "twitter_username": null,
+ "public_repos": 11,
+ "public_gists": 0,
+ "followers": 3,
+ "following": 3,
+ "created_at": "2014-03-21T10:37:00Z",
+ "updated_at": "2023-03-13T11:32:23Z",
+ "private_gists": 0,
+ "total_private_repos": 2,
+ "owned_private_repos": 2,
+ "disk_usage": 5935,
+ "collaborators": 1,
+ "two_factor_authentication": true,
+ "plan": {
+ "name": "free",
+ "space": 976562499,
+ "collaborators": 0,
+ "private_repos": 10000
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/orgs_hub4j-test-org-2.json
new file mode 100644
index 0000000000..300b6cedd5
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/orgs_hub4j-test-org-2.json
@@ -0,0 +1,50 @@
+{
+ "id": "ae6ef016-0e7a-49a3-901b-4f2807e31e2e",
+ "name": "orgs_hub4j-test-org",
+ "request": {
+ "url": "/orgs/hub4j-test-org",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "orgs_hub4j-test-org-2.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:20 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"46a40cb19e416c1d2dce19a8db11c0f32801a98a0c629dfa70fd25358454e97d\"",
+ "Last-Modified": "Mon, 15 May 2023 08:11:52 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4895",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "105",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CCAF:10E3E:13C923FB:14006713:647DF44C"
+ }
+ },
+ "uuid": "ae6ef016-0e7a-49a3-901b-4f2807e31e2e",
+ "persistent": true,
+ "insertionIndex": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json
new file mode 100644
index 0000000000..058b260dbd
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json
@@ -0,0 +1,50 @@
+{
+ "id": "1fc5275c-8afb-4d1e-9e09-a627b651097f",
+ "name": "repos_hub4j-test-org_github-api",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "repos_hub4j-test-org_github-api-3.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:21 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"ad2ec095079899332f528baec4441d362d0e6e5594b29ff93423e00ce1f5350b\"",
+ "Last-Modified": "Mon, 05 Jun 2023 09:18:21 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "repo",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4894",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "106",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CCB0:D7C5:EDFAFBE:F0A6BAB:647DF44C"
+ }
+ },
+ "uuid": "1fc5275c-8afb-4d1e-9e09-a627b651097f",
+ "persistent": true,
+ "insertionIndex": 3
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-4.json
new file mode 100644
index 0000000000..c786d63d84
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-4.json
@@ -0,0 +1,52 @@
+{
+ "id": "d88ce739-d1f7-4a9d-9ac1-4dd8ddb5a2c9",
+ "name": "repos_hub4j-test-org_github-api_actions_variables_mynewvariable",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api/actions/variables/mynewvariable",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "body": "{\"name\":\"MYNEWVARIABLE\",\"value\":\"myupdatevalue\",\"created_at\":\"2023-06-05T14:41:26Z\",\"updated_at\":\"2023-06-05T14:42:03Z\"}",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:21 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"adc647a71f6dd424746b9f6b68580e603d95daafc4c8026c6482cd6e56e6842d\"",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4893",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "107",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CCB1:86C7:AE0F8D4:B029CE4:647DF44D"
+ }
+ },
+ "uuid": "d88ce739-d1f7-4a9d-9ac1-4dd8ddb5a2c9",
+ "persistent": true,
+ "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-actions-variables-mynewvariable",
+ "requiredScenarioState": "Started",
+ "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-actions-variables-mynewvariable-2",
+ "insertionIndex": 4
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-5.json
new file mode 100644
index 0000000000..a16c2ae5a3
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-5.json
@@ -0,0 +1,42 @@
+{
+ "id": "4258eddb-68ee-4b81-a663-ae5b1d15246d",
+ "name": "repos_hub4j-test-org_github-api_actions_variables_mynewvariable",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api/actions/variables/MYNEWVARIABLE",
+ "method": "DELETE",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 204,
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:22 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4892",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "108",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "Vary": "Accept-Encoding, Accept, X-Requested-With",
+ "X-GitHub-Request-Id": "CCB2:EA30:E5C990A:E860BEB:647DF44D"
+ }
+ },
+ "uuid": "4258eddb-68ee-4b81-a663-ae5b1d15246d",
+ "persistent": true,
+ "insertionIndex": 5
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-6.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-6.json
new file mode 100644
index 0000000000..e0ce969310
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-6.json
@@ -0,0 +1,46 @@
+{
+ "id": "bce04a9b-5390-4605-a3c2-466516e59cce",
+ "name": "repos_hub4j-test-org_github-api_actions_variables_mynewvariable",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api/actions/variables/mynewvariable",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 404,
+ "body": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/actions/variables#get-a-repository-variable\"}",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:22 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4891",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "109",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "Vary": "Accept-Encoding, Accept, X-Requested-With",
+ "X-GitHub-Request-Id": "743A:8B14:10B608C0:10E55C07:647DF44E"
+ }
+ },
+ "uuid": "bce04a9b-5390-4605-a3c2-466516e59cce",
+ "persistent": true,
+ "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-actions-variables-mynewvariable",
+ "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-actions-variables-mynewvariable-2",
+ "insertionIndex": 6
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/user-1.json
new file mode 100644
index 0000000000..b4122cfe40
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testDeleteRepoActionVariable/mappings/user-1.json
@@ -0,0 +1,50 @@
+{
+ "id": "43bf07f8-47b8-47f0-beb1-962b1a3835cc",
+ "name": "user",
+ "request": {
+ "url": "/user",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "user-1.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:19 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"72b451bc289e83190862630ea2754b45789caedda90121a9584bce45fe6830c8\"",
+ "Last-Modified": "Mon, 13 Mar 2023 11:32:23 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4897",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "103",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CCAD:51B5:1633B1D5:1670787E:647DF44B"
+ }
+ },
+ "uuid": "43bf07f8-47b8-47f0-beb1-962b1a3835cc",
+ "persistent": true,
+ "insertionIndex": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/orgs_hub4j-test-org-2.json
index b2cc0d92a0..25c602bdf3 100644
--- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/orgs_hub4j-test-org-2.json
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/orgs_hub4j-test-org-2.json
@@ -16,18 +16,18 @@
"has_repository_projects": true,
"public_repos": 1,
"public_gists": 0,
- "followers": 8,
+ "followers": 9,
"following": 0,
"html_url": "https://github.com/hub4j-test-org",
"created_at": "2020-01-03T09:09:41Z",
"updated_at": "2023-05-15T08:11:52Z",
"type": "Organization",
- "total_private_repos": 1534,
- "owned_private_repos": 1574,
+ "total_private_repos": 1630,
+ "owned_private_repos": 1671,
"private_gists": 0,
- "disk_usage": 4263895,
- "collaborators": 72,
- "billing_email": "xxx@yyy.com",
+ "disk_usage": 4872624,
+ "collaborators": 75,
+ "billing_email": "garridobarrera@gmail.com",
"default_repository_permission": "none",
"members_can_create_repositories": false,
"two_factor_requirement_enabled": false,
@@ -44,7 +44,7 @@
"name": "enterprise",
"space": 976562499,
"private_repos": 999999,
- "filled_seats": 5072,
+ "filled_seats": 5153,
"seats": 5664
},
"advanced_security_enabled_for_new_repositories": false,
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json
index b0f031435e..6cb6e062cc 100644
--- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json
@@ -1,6 +1,6 @@
{
- "id": 317839899,
- "node_id": "MDEwOlJlcG9zaXRvcnkzMTc4Mzk4OTk=",
+ "id": 649619181,
+ "node_id": "R_kgDOJrhm7Q",
"name": "github-api",
"full_name": "hub4j-test-org/github-api",
"private": true,
@@ -25,7 +25,7 @@
"site_admin": false
},
"html_url": "https://github.com/hub4j-test-org/github-api",
- "description": null,
+ "description": "github-api",
"fork": false,
"url": "https://api.github.com/repos/hub4j-test-org/github-api",
"forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks",
@@ -64,15 +64,15 @@
"labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}",
"releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}",
"deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments",
- "created_at": "2020-12-02T11:25:38Z",
- "updated_at": "2022-06-10T11:48:11Z",
- "pushed_at": "2023-05-15T10:30:23Z",
+ "created_at": "2023-06-05T09:18:13Z",
+ "updated_at": "2023-06-05T09:18:21Z",
+ "pushed_at": "2023-06-05T09:18:39Z",
"git_url": "git://github.com/hub4j-test-org/github-api.git",
"ssh_url": "git@github.com:hub4j-test-org/github-api.git",
"clone_url": "https://github.com/hub4j-test-org/github-api.git",
"svn_url": "https://github.com/hub4j-test-org/github-api",
"homepage": null,
- "size": 15775,
+ "size": 7,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
@@ -81,22 +81,24 @@
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
- "has_discussions": true,
+ "has_discussions": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
- "open_issues_count": 358,
+ "open_issues_count": 0,
"license": null,
"allow_forking": false,
"is_template": false,
"web_commit_signoff_required": false,
- "topics": [],
+ "topics": [
+ "topiclanguage"
+ ],
"visibility": "private",
"forks": 0,
- "open_issues": 358,
+ "open_issues": 0,
"watchers": 0,
- "default_branch": "main",
+ "default_branch": "develop",
"permissions": {
"admin": true,
"maintain": true,
@@ -104,7 +106,7 @@
"triage": true,
"pull": true
},
- "temp_clone_token": "ABVSGFSHJP3EZB4Y6UK2PQLEMIMI2",
+ "temp_clone_token": "ABVSGFWHKEOHAZLNFDN2WA3EPX2PG",
"allow_squash_merge": true,
"allow_merge_commit": true,
"allow_rebase_merge": true,
@@ -137,5 +139,5 @@
"site_admin": false
},
"network_count": 0,
- "subscribers_count": 5
+ "subscribers_count": 2
}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/user-1.json
index f2304a6ede..08775b9cda 100644
--- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/user-1.json
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/__files/user-1.json
@@ -28,7 +28,7 @@
"public_repos": 11,
"public_gists": 0,
"followers": 3,
- "following": 2,
+ "following": 3,
"created_at": "2014-03-21T10:37:00Z",
"updated_at": "2023-03-13T11:32:23Z",
"private_gists": 0,
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/orgs_hub4j-test-org-2.json
index 732de27f5d..e19d1222b0 100644
--- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/orgs_hub4j-test-org-2.json
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/orgs_hub4j-test-org-2.json
@@ -1,5 +1,5 @@
{
- "id": "6831ee08-d197-4e72-b2b7-9b4c97997f3a",
+ "id": "43a649a4-f410-4d1b-8094-50fdb86d4e56",
"name": "orgs_hub4j-test-org",
"request": {
"url": "/orgs/hub4j-test-org",
@@ -15,23 +15,23 @@
"bodyFileName": "orgs_hub4j-test-org-2.json",
"headers": {
"Server": "GitHub.com",
- "Date": "Mon, 15 May 2023 11:28:33 GMT",
+ "Date": "Mon, 05 Jun 2023 14:40:06 GMT",
"Content-Type": "application/json; charset=utf-8",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding, Accept, X-Requested-With"
],
- "ETag": "W/\"210fe7604fbf3cb73c20f3bc9dd95de3c73e21a0d2951bd667321d59e920633f\"",
+ "ETag": "W/\"46a40cb19e416c1d2dce19a8db11c0f32801a98a0c629dfa70fd25358454e97d\"",
"Last-Modified": "Mon, 15 May 2023 08:11:52 GMT",
"X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
"X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
"X-GitHub-Media-Type": "github.v3; format=json",
"x-github-api-version-selected": "2022-11-28",
"X-RateLimit-Limit": "5000",
- "X-RateLimit-Remaining": "4804",
- "X-RateLimit-Reset": "1684151924",
- "X-RateLimit-Used": "196",
+ "X-RateLimit-Remaining": "4913",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "87",
"X-RateLimit-Resource": "core",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
"Access-Control-Allow-Origin": "*",
@@ -41,10 +41,10 @@
"X-XSS-Protection": "0",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
- "X-GitHub-Request-Id": "F3A4:B316:162B7156:1665F336:64621760"
+ "X-GitHub-Request-Id": "CC60:2143:C603F3C:C83F892:647DF3C6"
}
},
- "uuid": "6831ee08-d197-4e72-b2b7-9b4c97997f3a",
+ "uuid": "43a649a4-f410-4d1b-8094-50fdb86d4e56",
"persistent": true,
"insertionIndex": 2
}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json
index d728f2e20e..a94c45698c 100644
--- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json
@@ -1,5 +1,5 @@
{
- "id": "d8327d74-221f-4954-87f0-5cd9330e7b64",
+ "id": "067e960b-58de-4bb3-9d66-21a3f334c523",
"name": "repos_hub4j-test-org_github-api",
"request": {
"url": "/repos/hub4j-test-org/github-api",
@@ -15,23 +15,23 @@
"bodyFileName": "repos_hub4j-test-org_github-api-3.json",
"headers": {
"Server": "GitHub.com",
- "Date": "Mon, 15 May 2023 11:28:33 GMT",
+ "Date": "Mon, 05 Jun 2023 14:40:07 GMT",
"Content-Type": "application/json; charset=utf-8",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding, Accept, X-Requested-With"
],
- "ETag": "W/\"f76e5e9fb42c88f405022966a82855424f54cfc587f0cf2ef85cc4096cb78e8e\"",
- "Last-Modified": "Fri, 10 Jun 2022 11:48:11 GMT",
+ "ETag": "W/\"ad2ec095079899332f528baec4441d362d0e6e5594b29ff93423e00ce1f5350b\"",
+ "Last-Modified": "Mon, 05 Jun 2023 09:18:21 GMT",
"X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
"X-Accepted-OAuth-Scopes": "repo",
"X-GitHub-Media-Type": "github.v3; format=json",
"x-github-api-version-selected": "2022-11-28",
"X-RateLimit-Limit": "5000",
- "X-RateLimit-Remaining": "4803",
- "X-RateLimit-Reset": "1684151924",
- "X-RateLimit-Used": "197",
+ "X-RateLimit-Remaining": "4912",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "88",
"X-RateLimit-Resource": "core",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
"Access-Control-Allow-Origin": "*",
@@ -41,10 +41,10 @@
"X-XSS-Protection": "0",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
- "X-GitHub-Request-Id": "F3A9:7C7F:1544F22C:157B9E82:64621761"
+ "X-GitHub-Request-Id": "CC61:E303:180C3883:184BC7EE:647DF3C7"
}
},
- "uuid": "d8327d74-221f-4954-87f0-5cd9330e7b64",
+ "uuid": "067e960b-58de-4bb3-9d66-21a3f334c523",
"persistent": true,
"insertionIndex": 3
}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_prueba-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_myvar-4.json
similarity index 76%
rename from src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_prueba-4.json
rename to src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_myvar-4.json
index dbd587d5d8..4f06adbe85 100644
--- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_prueba-4.json
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_myvar-4.json
@@ -1,5 +1,5 @@
{
- "id": "7e03568a-5a3f-45da-bd11-32da4cf63a67",
+ "id": "624eb199-1d0c-4b4c-b5c6-9cc8a918b15e",
"name": "repos_hub4j-test-org_github-api_actions_variables_myvar",
"request": {
"url": "/repos/hub4j-test-org/github-api/actions/variables/myvar",
@@ -12,25 +12,25 @@
},
"response": {
"status": 200,
- "body": "{\"name\":\"myvar\",\"value\":\"this is my var value\",\"created_at\":\"2023-05-15T09:56:04Z\",\"updated_at\":\"2023-05-15T09:56:04Z\"}",
+ "body": "{\"name\":\"MYVAR\",\"value\":\"this is my var value\",\"created_at\":\"2023-06-05T13:57:01Z\",\"updated_at\":\"2023-06-05T13:57:39Z\"}",
"headers": {
"Server": "GitHub.com",
- "Date": "Mon, 15 May 2023 11:28:34 GMT",
+ "Date": "Mon, 05 Jun 2023 14:40:07 GMT",
"Content-Type": "application/json; charset=utf-8",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding, Accept, X-Requested-With"
],
- "ETag": "W/\"1312302596e84f4a797e200d0161d574f7461ac91f9d6cc37157804ad0405e9b\"",
+ "ETag": "W/\"85935ba33a83ca7e6b8bcd0f53a928c40a1a61529c90b08ea3ccf368a7c8f836\"",
"X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
"X-Accepted-OAuth-Scopes": "",
"X-GitHub-Media-Type": "github.v3; format=json",
"x-github-api-version-selected": "2022-11-28",
"X-RateLimit-Limit": "5000",
- "X-RateLimit-Remaining": "4802",
- "X-RateLimit-Reset": "1684151924",
- "X-RateLimit-Used": "198",
+ "X-RateLimit-Remaining": "4911",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "89",
"X-RateLimit-Resource": "core",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
"Access-Control-Allow-Origin": "*",
@@ -40,10 +40,10 @@
"X-XSS-Protection": "0",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
- "X-GitHub-Request-Id": "F3AA:B316:162B75E0:1665F7DF:64621762"
+ "X-GitHub-Request-Id": "CC62:8B14:10B3D9D6:10E328E5:647DF3C7"
}
},
- "uuid": "7e03568a-5a3f-45da-bd11-32da4cf63a67",
+ "uuid": "624eb199-1d0c-4b4c-b5c6-9cc8a918b15e",
"persistent": true,
"insertionIndex": 4
}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/user-1.json
index 35c87bc8b8..302c6be055 100644
--- a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/user-1.json
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testRepoActionVariable/mappings/user-1.json
@@ -1,5 +1,5 @@
{
- "id": "696aed55-1176-4a27-9251-fb60786aafb2",
+ "id": "634f7697-2ba4-4e53-ad18-c99d2696e77d",
"name": "user",
"request": {
"url": "/user",
@@ -15,23 +15,23 @@
"bodyFileName": "user-1.json",
"headers": {
"Server": "GitHub.com",
- "Date": "Mon, 15 May 2023 11:28:32 GMT",
+ "Date": "Mon, 05 Jun 2023 14:40:05 GMT",
"Content-Type": "application/json; charset=utf-8",
"Cache-Control": "private, max-age=60, s-maxage=60",
"Vary": [
"Accept, Authorization, Cookie, X-GitHub-OTP",
"Accept-Encoding, Accept, X-Requested-With"
],
- "ETag": "W/\"99e41ebc35ff32f8fecb461e9fa2493cbcac8cf66531459a23253ad761863675\"",
+ "ETag": "W/\"72b451bc289e83190862630ea2754b45789caedda90121a9584bce45fe6830c8\"",
"Last-Modified": "Mon, 13 Mar 2023 11:32:23 GMT",
"X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
"X-Accepted-OAuth-Scopes": "",
"X-GitHub-Media-Type": "github.v3; format=json",
"x-github-api-version-selected": "2022-11-28",
"X-RateLimit-Limit": "5000",
- "X-RateLimit-Remaining": "4806",
- "X-RateLimit-Reset": "1684151924",
- "X-RateLimit-Used": "194",
+ "X-RateLimit-Remaining": "4915",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "85",
"X-RateLimit-Resource": "core",
"Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
"Access-Control-Allow-Origin": "*",
@@ -41,10 +41,10 @@
"X-XSS-Protection": "0",
"Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
"Content-Security-Policy": "default-src 'none'",
- "X-GitHub-Request-Id": "F39D:6AE0:E1A77FC:E42BE32:64621760"
+ "X-GitHub-Request-Id": "CC5E:51B5:163198FA:166E5B89:647DF3C5"
}
},
- "uuid": "696aed55-1176-4a27-9251-fb60786aafb2",
+ "uuid": "634f7697-2ba4-4e53-ad18-c99d2696e77d",
"persistent": true,
"insertionIndex": 1
}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/__files/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/__files/orgs_hub4j-test-org-2.json
new file mode 100644
index 0000000000..25c602bdf3
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/__files/orgs_hub4j-test-org-2.json
@@ -0,0 +1,58 @@
+{
+ "login": "hub4j-test-org",
+ "id": 59470614,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjU5NDcwNjE0",
+ "url": "https://api.github.com/orgs/hub4j-test-org",
+ "repos_url": "https://api.github.com/orgs/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/orgs/hub4j-test-org/events",
+ "hooks_url": "https://api.github.com/orgs/hub4j-test-org/hooks",
+ "issues_url": "https://api.github.com/orgs/hub4j-test-org/issues",
+ "members_url": "https://api.github.com/orgs/hub4j-test-org/members{/member}",
+ "public_members_url": "https://api.github.com/orgs/hub4j-test-org/public_members{/member}",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59470614?v=4",
+ "description": null,
+ "is_verified": false,
+ "has_organization_projects": true,
+ "has_repository_projects": true,
+ "public_repos": 1,
+ "public_gists": 0,
+ "followers": 9,
+ "following": 0,
+ "html_url": "https://github.com/hub4j-test-org",
+ "created_at": "2020-01-03T09:09:41Z",
+ "updated_at": "2023-05-15T08:11:52Z",
+ "type": "Organization",
+ "total_private_repos": 1630,
+ "owned_private_repos": 1671,
+ "private_gists": 0,
+ "disk_usage": 4872624,
+ "collaborators": 75,
+ "billing_email": "garridobarrera@gmail.com",
+ "default_repository_permission": "none",
+ "members_can_create_repositories": false,
+ "two_factor_requirement_enabled": false,
+ "members_allowed_repository_creation_type": "none",
+ "members_can_create_public_repositories": false,
+ "members_can_create_private_repositories": false,
+ "members_can_create_internal_repositories": false,
+ "members_can_create_pages": true,
+ "members_can_fork_private_repositories": false,
+ "web_commit_signoff_required": false,
+ "members_can_create_public_pages": true,
+ "members_can_create_private_pages": true,
+ "plan": {
+ "name": "enterprise",
+ "space": 976562499,
+ "private_repos": 999999,
+ "filled_seats": 5153,
+ "seats": 5664
+ },
+ "advanced_security_enabled_for_new_repositories": false,
+ "dependabot_alerts_enabled_for_new_repositories": false,
+ "dependabot_security_updates_enabled_for_new_repositories": false,
+ "dependency_graph_enabled_for_new_repositories": false,
+ "secret_scanning_enabled_for_new_repositories": false,
+ "secret_scanning_push_protection_enabled_for_new_repositories": false,
+ "secret_scanning_push_protection_custom_link_enabled": false,
+ "secret_scanning_push_protection_custom_link": null
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json
new file mode 100644
index 0000000000..3f1d4881f1
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/__files/repos_hub4j-test-org_github-api-3.json
@@ -0,0 +1,143 @@
+{
+ "id": 649619181,
+ "node_id": "R_kgDOJrhm7Q",
+ "name": "github-api",
+ "full_name": "hub4j-test-org/github-api",
+ "private": true,
+ "owner": {
+ "login": "hub4j-test-org",
+ "id": 59470614,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjU5NDcwNjE0",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59470614?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/hub4j-test-org",
+ "html_url": "https://github.com/hub4j-test-org",
+ "followers_url": "https://api.github.com/users/hub4j-test-org/followers",
+ "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
+ "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
+ "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
+ "repos_url": "https://api.github.com/users/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "html_url": "https://github.com/hub4j-test-org/github-api",
+ "description": "github-api",
+ "fork": false,
+ "url": "https://api.github.com/repos/hub4j-test-org/github-api",
+ "forks_url": "https://api.github.com/repos/hub4j-test-org/github-api/forks",
+ "keys_url": "https://api.github.com/repos/hub4j-test-org/github-api/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/hub4j-test-org/github-api/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/hub4j-test-org/github-api/teams",
+ "hooks_url": "https://api.github.com/repos/hub4j-test-org/github-api/hooks",
+ "issue_events_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/hub4j-test-org/github-api/events",
+ "assignees_url": "https://api.github.com/repos/hub4j-test-org/github-api/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/hub4j-test-org/github-api/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/tags",
+ "blobs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/hub4j-test-org/github-api/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/hub4j-test-org/github-api/languages",
+ "stargazers_url": "https://api.github.com/repos/hub4j-test-org/github-api/stargazers",
+ "contributors_url": "https://api.github.com/repos/hub4j-test-org/github-api/contributors",
+ "subscribers_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscribers",
+ "subscription_url": "https://api.github.com/repos/hub4j-test-org/github-api/subscription",
+ "commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/hub4j-test-org/github-api/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/hub4j-test-org/github-api/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/hub4j-test-org/github-api/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/hub4j-test-org/github-api/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/hub4j-test-org/github-api/merges",
+ "archive_url": "https://api.github.com/repos/hub4j-test-org/github-api/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/hub4j-test-org/github-api/downloads",
+ "issues_url": "https://api.github.com/repos/hub4j-test-org/github-api/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/hub4j-test-org/github-api/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/hub4j-test-org/github-api/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/hub4j-test-org/github-api/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/hub4j-test-org/github-api/labels{/name}",
+ "releases_url": "https://api.github.com/repos/hub4j-test-org/github-api/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/hub4j-test-org/github-api/deployments",
+ "created_at": "2023-06-05T09:18:13Z",
+ "updated_at": "2023-06-05T09:18:21Z",
+ "pushed_at": "2023-06-05T09:18:39Z",
+ "git_url": "git://github.com/hub4j-test-org/github-api.git",
+ "ssh_url": "git@github.com:hub4j-test-org/github-api.git",
+ "clone_url": "https://github.com/hub4j-test-org/github-api.git",
+ "svn_url": "https://github.com/hub4j-test-org/github-api",
+ "homepage": null,
+ "size": 7,
+ "stargazers_count": 0,
+ "watchers_count": 0,
+ "language": null,
+ "has_issues": true,
+ "has_projects": true,
+ "has_downloads": true,
+ "has_wiki": true,
+ "has_pages": false,
+ "has_discussions": false,
+ "forks_count": 0,
+ "mirror_url": null,
+ "archived": false,
+ "disabled": false,
+ "open_issues_count": 0,
+ "license": null,
+ "allow_forking": false,
+ "is_template": false,
+ "web_commit_signoff_required": false,
+ "topics": [
+ "topiclanguage"
+ ],
+ "visibility": "private",
+ "forks": 0,
+ "open_issues": 0,
+ "watchers": 0,
+ "default_branch": "develop",
+ "permissions": {
+ "admin": true,
+ "maintain": true,
+ "push": true,
+ "triage": true,
+ "pull": true
+ },
+ "temp_clone_token": "ABVSGFSARH5HR7ZIAXGJ54DEPX2WM",
+ "allow_squash_merge": true,
+ "allow_merge_commit": true,
+ "allow_rebase_merge": true,
+ "allow_auto_merge": false,
+ "delete_branch_on_merge": true,
+ "allow_update_branch": false,
+ "use_squash_pr_title_as_default": false,
+ "squash_merge_commit_message": "COMMIT_MESSAGES",
+ "squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
+ "merge_commit_message": "PR_TITLE",
+ "merge_commit_title": "MERGE_MESSAGE",
+ "organization": {
+ "login": "hub4j-test-org",
+ "id": 59470614,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjU5NDcwNjE0",
+ "avatar_url": "https://avatars.githubusercontent.com/u/59470614?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/hub4j-test-org",
+ "html_url": "https://github.com/hub4j-test-org",
+ "followers_url": "https://api.github.com/users/hub4j-test-org/followers",
+ "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
+ "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
+ "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
+ "repos_url": "https://api.github.com/users/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "network_count": 0,
+ "subscribers_count": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/__files/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/__files/user-1.json
new file mode 100644
index 0000000000..08775b9cda
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/__files/user-1.json
@@ -0,0 +1,46 @@
+{
+ "login": "garridobarrera",
+ "id": 7021334,
+ "node_id": "MDQ6VXNlcjcwMjEzMzQ=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/7021334?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/garridobarrera",
+ "html_url": "https://github.com/garridobarrera",
+ "followers_url": "https://api.github.com/users/garridobarrera/followers",
+ "following_url": "https://api.github.com/users/garridobarrera/following{/other_user}",
+ "gists_url": "https://api.github.com/users/garridobarrera/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/garridobarrera/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/garridobarrera/subscriptions",
+ "organizations_url": "https://api.github.com/users/garridobarrera/orgs",
+ "repos_url": "https://api.github.com/users/garridobarrera/repos",
+ "events_url": "https://api.github.com/users/garridobarrera/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/garridobarrera/received_events",
+ "type": "User",
+ "site_admin": false,
+ "name": "José Manuel Garrido Barrera",
+ "company": "personal",
+ "blog": "",
+ "location": null,
+ "email": "garridobarrera@gmail.com",
+ "hireable": null,
+ "bio": null,
+ "twitter_username": null,
+ "public_repos": 11,
+ "public_gists": 0,
+ "followers": 3,
+ "following": 3,
+ "created_at": "2014-03-21T10:37:00Z",
+ "updated_at": "2023-03-13T11:32:23Z",
+ "private_gists": 0,
+ "total_private_repos": 2,
+ "owned_private_repos": 2,
+ "disk_usage": 5935,
+ "collaborators": 1,
+ "two_factor_authentication": true,
+ "plan": {
+ "name": "free",
+ "space": 976562499,
+ "collaborators": 0,
+ "private_repos": 10000
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/orgs_hub4j-test-org-2.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/orgs_hub4j-test-org-2.json
new file mode 100644
index 0000000000..86c320ea61
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/orgs_hub4j-test-org-2.json
@@ -0,0 +1,50 @@
+{
+ "id": "ec015fc5-de63-4b49-a0f1-3533fbec1304",
+ "name": "orgs_hub4j-test-org",
+ "request": {
+ "url": "/orgs/hub4j-test-org",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "orgs_hub4j-test-org-2.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:01 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"46a40cb19e416c1d2dce19a8db11c0f32801a98a0c629dfa70fd25358454e97d\"",
+ "Last-Modified": "Mon, 15 May 2023 08:11:52 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "admin:org, read:org, repo, user, write:org",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4902",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "98",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC99:62E4:1745DEC3:17857007:647DF439"
+ }
+ },
+ "uuid": "ec015fc5-de63-4b49-a0f1-3533fbec1304",
+ "persistent": true,
+ "insertionIndex": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json
new file mode 100644
index 0000000000..fe37896786
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api-3.json
@@ -0,0 +1,50 @@
+{
+ "id": "5253ccea-04a8-46a2-81fd-f4b53a3c4239",
+ "name": "repos_hub4j-test-org_github-api",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "repos_hub4j-test-org_github-api-3.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:02 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"ad2ec095079899332f528baec4441d362d0e6e5594b29ff93423e00ce1f5350b\"",
+ "Last-Modified": "Mon, 05 Jun 2023 09:18:21 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "repo",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4901",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "99",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC9A:EA30:E5C3C98:E85AF0B:647DF439"
+ }
+ },
+ "uuid": "5253ccea-04a8-46a2-81fd-f4b53a3c4239",
+ "persistent": true,
+ "insertionIndex": 3
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-4.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-4.json
new file mode 100644
index 0000000000..979640577a
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-4.json
@@ -0,0 +1,52 @@
+{
+ "id": "4ae08d81-f174-4291-90ba-3e1ddc4c7e44",
+ "name": "repos_hub4j-test-org_github-api_actions_variables_mynewvariable",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api/actions/variables/MYNEWVARIABLE",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "body": "{\"name\":\"MYNEWVARIABLE\",\"value\":\"mynewvalue\",\"created_at\":\"2023-06-05T14:41:26Z\",\"updated_at\":\"2023-06-05T14:41:26Z\"}",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:02 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"ce64a844db6abf4edd4b3d80a8d2a1b698a7f6b39ddd029a703ff5e74688bf50\"",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4900",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "100",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC9B:10E3E:13C8D48C:1400172D:647DF43A"
+ }
+ },
+ "uuid": "4ae08d81-f174-4291-90ba-3e1ddc4c7e44",
+ "persistent": true,
+ "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-actions-variables-MYNEWVARIABLE",
+ "requiredScenarioState": "Started",
+ "newScenarioState": "scenario-1-repos-hub4j-test-org-github-api-actions-variables-MYNEWVARIABLE-2",
+ "insertionIndex": 4
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-5.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-5.json
new file mode 100644
index 0000000000..6b4f2a0ccb
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-5.json
@@ -0,0 +1,49 @@
+{
+ "id": "ddade36a-39bf-4456-a991-7bcb6e6445ab",
+ "name": "repos_hub4j-test-org_github-api_actions_variables_mynewvariable",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api/actions/variables/MYNEWVARIABLE",
+ "method": "PATCH",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ },
+ "bodyPatterns": [
+ {
+ "equalToJson": "{\"name\":\"MYNEWVARIABLE\",\"value\":\"myupdatevalue\"}",
+ "ignoreArrayOrder": true,
+ "ignoreExtraElements": false
+ }
+ ]
+ },
+ "response": {
+ "status": 204,
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:03 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4899",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "101",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "Vary": "Accept-Encoding, Accept, X-Requested-With",
+ "X-GitHub-Request-Id": "CC9C:1168F:1635BE44:16732AC5:647DF43A"
+ }
+ },
+ "uuid": "ddade36a-39bf-4456-a991-7bcb6e6445ab",
+ "persistent": true,
+ "insertionIndex": 5
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-6.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-6.json
new file mode 100644
index 0000000000..76ff6a75bc
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/repos_hub4j-test-org_github-api_actions_variables_mynewvariable-6.json
@@ -0,0 +1,51 @@
+{
+ "id": "a3144943-cefe-4ec1-9d88-ff2ad08ddbb5",
+ "name": "repos_hub4j-test-org_github-api_actions_variables_mynewvariable",
+ "request": {
+ "url": "/repos/hub4j-test-org/github-api/actions/variables/MYNEWVARIABLE",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "body": "{\"name\":\"MYNEWVARIABLE\",\"value\":\"myupdatevalue\",\"created_at\":\"2023-06-05T14:41:26Z\",\"updated_at\":\"2023-06-05T14:42:03Z\"}",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:03 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"adc647a71f6dd424746b9f6b68580e603d95daafc4c8026c6482cd6e56e6842d\"",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4898",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "102",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC9D:2143:C6213A1:C85D073:647DF43B"
+ }
+ },
+ "uuid": "a3144943-cefe-4ec1-9d88-ff2ad08ddbb5",
+ "persistent": true,
+ "scenarioName": "scenario-1-repos-hub4j-test-org-github-api-actions-variables-MYNEWVARIABLE",
+ "requiredScenarioState": "scenario-1-repos-hub4j-test-org-github-api-actions-variables-MYNEWVARIABLE-2",
+ "insertionIndex": 6
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/user-1.json b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/user-1.json
new file mode 100644
index 0000000000..089f9f6cc9
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHRepositoryTest/wiremock/testUpdateRepoActionVariable/mappings/user-1.json
@@ -0,0 +1,50 @@
+{
+ "id": "43b68c03-8469-4721-8370-2ddbc435ae76",
+ "name": "user",
+ "request": {
+ "url": "/user",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.v3+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "user-1.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Mon, 05 Jun 2023 14:42:00 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "private, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept, Authorization, Cookie, X-GitHub-OTP",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"72b451bc289e83190862630ea2754b45789caedda90121a9584bce45fe6830c8\"",
+ "Last-Modified": "Mon, 13 Mar 2023 11:32:23 GMT",
+ "X-OAuth-Scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, admin:ssh_signing_key, audit_log, codespace, delete:packages, delete_repo, gist, notifications, project, repo, user, workflow, write:discussion, write:packages",
+ "X-Accepted-OAuth-Scopes": "",
+ "X-GitHub-Media-Type": "github.v3; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "X-RateLimit-Limit": "5000",
+ "X-RateLimit-Remaining": "4904",
+ "X-RateLimit-Reset": "1685976900",
+ "X-RateLimit-Used": "96",
+ "X-RateLimit-Resource": "core",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "CC97:4749:B22F17B:B448F22:647DF438"
+ }
+ },
+ "uuid": "43b68c03-8469-4721-8370-2ddbc435ae76",
+ "persistent": true,
+ "insertionIndex": 1
+}
\ No newline at end of file
From 8e730653fc69b0bdaeadf87774ad05a99672a896 Mon Sep 17 00:00:00 2001
From: Nik Clayton
+ * This class is used to build a JWT using the jjwt library. It uses reflection + * to support older versions of jjwt. The class may be removed again, once we + * are sure, we do no longer need to support pre-0.12.x versions of jjwt. + *
+ */ final class JwtBuilderUtil { + + private static final Logger LOGGER = Logger.getLogger(JwtBuilderUtil.class.getName()); + + /** + * Get a method from an object. + * + * @param obj object + * @param method method name + * @param params parameters of the method + * @return method + * @throws NoSuchMethodException if the method does not exist + */ private static Method getMethod(Object obj, String method, Class>... params) throws NoSuchMethodException { Class> type = obj.getClass(); return type.getMethod(method, params); } + /** + * Check if an object has a method. + * + * @param obj object + * @param method method name + * @param params parameters of the method + * @return true if the method exists + */ private static boolean hasMethod(Object obj, String method, Class>... params) { try { return JwtBuilderUtil.getMethod(obj, method, params) != null; @@ -24,6 +54,15 @@ private static boolean hasMethod(Object obj, String method, Class>... params) } } + /** + * Build a JWT. + * + * @param issuedAt issued at + * @param expiration expiration + * @param applicationId application id + * @param privateKey private key + * @return JWT + */ static String buildJwt(Instant issuedAt, Instant expiration, String applicationId, PrivateKey privateKey) { JwtBuilder jwtBuilder = Jwts.builder(); if (JwtBuilderUtil.hasMethod(jwtBuilder, "issuedAt", Date.class)) { @@ -34,16 +73,31 @@ static String buildJwt(Instant issuedAt, Instant expiration, String applicationI return jwtBuilder.json(new JacksonSerializer<>()).compact(); } + LOGGER.warning( + "You are using an outdated version of the io.jsonwebtoken:jjwt-* suite. Please consider an update."); + // older jjwt library versions try { return JwtBuilderUtil.buildByReflection(jwtBuilder, issuedAt, expiration, applicationId, privateKey); } catch (ReflectiveOperationException e) { throw new JwtReflectiveBuilderException( - "Exception building a JWT with reflective access to outdated versions of jjwt. Please consider an update.", + "Exception building a JWT with reflective access to outdated versions of the io.jsonwebtoken:jjwt-* suite. Please consider an update.", e); } } + /** + * This method builds a JWT using older (pre 0.12.x) versions of jjwt library by + * leveraging reflection. + * + * @param jwtBuilder builder object + * @param issuedAt issued at + * @param expiration expiration + * @param applicationId application id + * @param privateKey private key + * @return JWT + * @throws ReflectiveOperationException if reflection fails + */ private static String buildByReflection(JwtBuilder jwtBuilder, Instant issuedAt, Instant expiration, String applicationId, PrivateKey privateKey) throws ReflectiveOperationException { From ea1ad0fcca571974f91a85900907449623cfbe71 Mon Sep 17 00:00:00 2001 From: yasinherken- * This class is used to build a JWT using the jjwt library. It uses reflection - * to support older versions of jjwt. The class may be removed again, once we - * are sure, we do no longer need to support pre-0.12.x versions of jjwt. + * This class is used to build a JWT using the jjwt library. It uses reflection to support older versions of jjwt. The + * class may be removed once we are sure we no longer need to support pre-0.12.x versions of jjwt. *
*/ final class JwtBuilderUtil { @@ -25,103 +27,125 @@ final class JwtBuilderUtil { private static final Logger LOGGER = Logger.getLogger(JwtBuilderUtil.class.getName()); /** - * Get a method from an object. + * Build a JWT. * - * @param obj object - * @param method method name - * @param params parameters of the method - * @return method - * @throws NoSuchMethodException if the method does not exist + * @param issuedAt + * issued at + * @param expiration + * expiration + * @param applicationId + * application id + * @param privateKey + * private key + * @return JWT */ - private static Method getMethod(Object obj, String method, Class>... params) throws NoSuchMethodException { - Class> type = obj.getClass(); - return type.getMethod(method, params); - } + static String buildJwt(Instant issuedAt, Instant expiration, String applicationId, PrivateKey privateKey) { - /** - * Check if an object has a method. - * - * @param obj object - * @param method method name - * @param params parameters of the method - * @return true if the method exists - */ - private static boolean hasMethod(Object obj, String method, Class>... params) { try { - return JwtBuilderUtil.getMethod(obj, method, params) != null; - } catch (NoSuchMethodException e) { - return false; + return DefaultBuilderImpl.buildJwt(issuedAt, expiration, applicationId, privateKey); + } catch (NoSuchMethodError | NoClassDefFoundError e) { + LOGGER.info( + "You are using an outdated version of the io.jsonwebtoken:jjwt-* suite. v0.12.x or later is recommended."); + } + + // older jjwt library versions + try { + return ReflectionBuilderImpl.buildJwt(issuedAt, expiration, applicationId, privateKey); + } catch (SecurityException | ReflectiveOperationException re) { + throw new GHException( + "Could not build JWT using reflection on io.jsonwebtoken:jjwt-* suite." + + "The minimum supported version is v0.11.x, v0.12.x or later is recommended.", + re); } } /** - * Build a JWT. + * A class to isolate loading of JWT classes allowing us to catch and handle linkage errors. * - * @param issuedAt issued at - * @param expiration expiration - * @param applicationId application id - * @param privateKey private key - * @return JWT + * Without this class, JwtBuilderUtil.buildJwt() immediately throws NoClassDefFoundError when called. With this + * class the error is thrown when DefaultBuilder.build() is called allowing us to catch and handle it. */ - static String buildJwt(Instant issuedAt, Instant expiration, String applicationId, PrivateKey privateKey) { - JwtBuilder jwtBuilder = Jwts.builder(); - if (JwtBuilderUtil.hasMethod(jwtBuilder, "issuedAt", Date.class)) { + private static class DefaultBuilderImpl { + + /** + * This method builds a JWT using 0.12.x or later versions of jjwt library + * + * @param issuedAt + * issued at + * @param expiration + * expiration + * @param applicationId + * application id + * @param privateKey + * private key + * @return JWT + */ + private static String buildJwt(Instant issuedAt, + Instant expiration, + String applicationId, + PrivateKey privateKey) { + + // io.jsonwebtoken.security.SignatureAlgorithm is not present in v0.11.x and below. + // Trying to call a method that uses it causes "NoClassDefFoundError" if v0.11.x is being used. + SignatureAlgorithm rs256 = Jwts.SIG.RS256; + + JwtBuilder jwtBuilder = Jwts.builder(); jwtBuilder = jwtBuilder.issuedAt(Date.from(issuedAt)) .expiration(Date.from(expiration)) .issuer(applicationId) - .signWith(privateKey, Jwts.SIG.RS256); - return jwtBuilder.json(new JacksonSerializer<>()).compact(); - } - - LOGGER.warning( - "You are using an outdated version of the io.jsonwebtoken:jjwt-* suite. Please consider an update."); - - // older jjwt library versions - try { - return JwtBuilderUtil.buildByReflection(jwtBuilder, issuedAt, expiration, applicationId, privateKey); - } catch (ReflectiveOperationException e) { - throw new JwtReflectiveBuilderException( - "Exception building a JWT with reflective access to outdated versions of the io.jsonwebtoken:jjwt-* suite. Please consider an update.", - e); + .signWith(privateKey, rs256) + .json(new JacksonSerializer<>()); + return jwtBuilder.compact(); } } /** - * This method builds a JWT using older (pre 0.12.x) versions of jjwt library by - * leveraging reflection. - * - * @param jwtBuilder builder object - * @param issuedAt issued at - * @param expiration expiration - * @param applicationId application id - * @param privateKey private key - * @return JWT - * @throws ReflectiveOperationException if reflection fails + * A class to encapsulate building a JWT using reflection. */ - private static String buildByReflection(JwtBuilder jwtBuilder, Instant issuedAt, Instant expiration, - String applicationId, - PrivateKey privateKey) throws ReflectiveOperationException { - - Object builderObj = jwtBuilder; - - Method setIssuedAtMethod = JwtBuilderUtil.getMethod(builderObj, "setIssuedAt", Date.class); - builderObj = setIssuedAtMethod.invoke(builderObj, Date.from(issuedAt)); - - Method setExpirationMethod = JwtBuilderUtil.getMethod(builderObj, "setExpiration", Date.class); - builderObj = setExpirationMethod.invoke(builderObj, Date.from(expiration)); - - Method setIssuerMethod = JwtBuilderUtil.getMethod(builderObj, "setIssuer", String.class); - builderObj = setIssuerMethod.invoke(builderObj, applicationId); - - Method signWithMethod = JwtBuilderUtil.getMethod(builderObj, "signWith", PrivateKey.class, - SignatureAlgorithm.class); - builderObj = signWithMethod.invoke(builderObj, privateKey, SignatureAlgorithm.RS256); - - Method serializeToJsonMethod = JwtBuilderUtil.getMethod(builderObj, "serializeToJsonWith", - JacksonSerializer.class); - builderObj = serializeToJsonMethod.invoke(builderObj, new JacksonSerializer<>()); + private static class ReflectionBuilderImpl { + /** + * This method builds a JWT using older (pre 0.12.x) versions of jjwt library by leveraging reflection. + * + * @param issuedAt + * issued at + * @param expiration + * expiration + * @param applicationId + * application id + * @param privateKey + * private key + * @return JWTBuilder + * @throws ReflectiveOperationException + * if reflection fails + */ + private static String buildJwt(Instant issuedAt, + Instant expiration, + String applicationId, + PrivateKey privateKey) throws ReflectiveOperationException { + + JwtBuilder jwtBuilder = Jwts.builder(); + Class> jwtReflectionClass = jwtBuilder.getClass(); + + Method setIssuedAtMethod = jwtReflectionClass.getMethod("setIssuedAt", Date.class); + Method setIssuerMethod = jwtReflectionClass.getMethod("setIssuer", String.class); + Method setExpirationMethod = jwtReflectionClass.getMethod("setExpiration", Date.class); + Class> signatureAlgorithmClass = Class.forName("io.jsonwebtoken.SignatureAlgorithm"); + Enum> rs256SignatureAlgorithm = createEnumInstance(signatureAlgorithmClass, "RS256"); + Method signWithMethod = jwtReflectionClass.getMethod("signWith", Key.class, signatureAlgorithmClass); + Method serializeToJsonMethod = jwtReflectionClass.getMethod("serializeToJsonWith", Serializer.class); + + Object builderObj = jwtBuilder; + builderObj = setIssuedAtMethod.invoke(builderObj, Date.from(issuedAt)); + builderObj = setExpirationMethod.invoke(builderObj, Date.from(expiration)); + builderObj = setIssuerMethod.invoke(builderObj, applicationId); + builderObj = signWithMethod.invoke(builderObj, privateKey, rs256SignatureAlgorithm); + builderObj = serializeToJsonMethod.invoke(builderObj, new JacksonSerializer<>()); + return ((JwtBuilder) builderObj).compact(); + } - JwtBuilder resultBuilder = (JwtBuilder) builderObj; - return resultBuilder.compact(); + @SuppressWarnings("unchecked") + private static
+ * You must use a JWT to access this endpoint.
+ *
+ * @param since
+ * - Allows users to get installations that have been updated since a given date.
+ * @return a list of App installations since a given time.
+ * @see List installations
+ */
+ @Preview(MACHINE_MAN)
+ public PagedIterable
+ * This is different from Teams discussions (see {@link GHDiscussion}). + *
+ * The discussion_comment event exposes the GraphQL object (more or less - the ids are handled differently for instance)
+ * directly. The new Discussions API is only available through GraphQL so for now you cannot execute any actions on this
+ * object.
+ *
+ * @author Guillaume Smet
+ * @see The GraphQL
+ * API for Discussions
+ */
+public class GHRepositoryDiscussionComment extends GHObject {
+
+ private String htmlUrl;
+
+ private Long parentId;
+ private int childCommentCount;
+
+ private GHUser user;
+ private GHCommentAuthorAssociation authorAssociation;
+ private String body;
+
+ /**
+ * Gets the html url.
+ *
+ * @return the html url
+ */
+ public URL getHtmlUrl() {
+ return GitHubClient.parseURL(htmlUrl);
+ }
+
+ /**
+ * Gets the parent comment id.
+ *
+ * @return the parent comment id
+ */
+ public Long getParentId() {
+ return parentId;
+ }
+
+ /**
+ * Gets the number of child comments.
+ *
+ * @return the number of child comments
+ */
+ public int getChildCommentCount() {
+ return childCommentCount;
+ }
+
+ /**
+ * Gets the user.
+ *
+ * @return the user
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ public GHUser getUser() throws IOException {
+ return root().intern(user);
+ }
+
+ /**
+ * Gets the author association.
+ *
+ * @return the author association
+ */
+ public GHCommentAuthorAssociation getAuthorAssociation() {
+ return authorAssociation;
+ }
+
+ /**
+ * Gets the body.
+ *
+ * @return the body
+ */
+ public String getBody() {
+ return body;
+ }
+}
diff --git a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java
index 2400218a16..783fa06a6f 100644
--- a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java
+++ b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java
@@ -1423,6 +1423,76 @@ public void discussion_labeled() throws Exception {
assertThat(label.getDescription(), is(nullValue()));
}
+ /**
+ * Discussion comment created.
+ *
+ * @throws Exception
+ * the exception
+ */
+ @Test
+ public void discussion_comment_created() throws Exception {
+ final GHEventPayload.DiscussionComment discussionCommentPayload = GitHub.offline()
+ .parseEventPayload(payload.asReader(), GHEventPayload.DiscussionComment.class);
+
+ assertThat(discussionCommentPayload.getAction(), is("created"));
+ assertThat(discussionCommentPayload.getRepository().getFullName(), is("gsmet/quarkus-bot-java-playground"));
+ assertThat(discussionCommentPayload.getSender().getLogin(), is("gsmet"));
+
+ GHRepositoryDiscussion discussion = discussionCommentPayload.getDiscussion();
+
+ GHRepositoryDiscussion.Category category = discussion.getCategory();
+
+ assertThat(category.getId(), is(33522033L));
+ assertThat(category.getNodeId(), is("DIC_kwDOEq3cwc4B_4Fx"));
+ assertThat(category.getEmoji(), is(":pray:"));
+ assertThat(category.getName(), is("Q&A"));
+ assertThat(category.getDescription(), is("Ask the community for help"));
+ assertThat(category.getCreatedAt().getTime(), is(1636991431000L));
+ assertThat(category.getUpdatedAt().getTime(), is(1636991431000L));
+ assertThat(category.getSlug(), is("q-a"));
+ assertThat(category.isAnswerable(), is(true));
+
+ assertThat(discussion.getAnswerHtmlUrl(), is(nullValue()));
+ assertThat(discussion.getAnswerChosenAt(), is(nullValue()));
+ assertThat(discussion.getAnswerChosenBy(), is(nullValue()));
+
+ assertThat(discussion.getHtmlUrl().toString(),
+ is("https://github.com/gsmet/quarkus-bot-java-playground/discussions/162"));
+ assertThat(discussion.getId(), is(6090566L));
+ assertThat(discussion.getNodeId(), is("D_kwDOEq3cwc4AXO9G"));
+ assertThat(discussion.getNumber(), is(162));
+ assertThat(discussion.getTitle(), is("New test question"));
+
+ assertThat(discussion.getUser().getLogin(), is("gsmet"));
+ assertThat(discussion.getUser().getId(), is(1279749L));
+ assertThat(discussion.getUser().getNodeId(), is("MDQ6VXNlcjEyNzk3NDk="));
+
+ assertThat(discussion.getState(), is(GHRepositoryDiscussion.State.OPEN));
+ assertThat(discussion.isLocked(), is(false));
+ assertThat(discussion.getComments(), is(1));
+ assertThat(discussion.getCreatedAt().getTime(), is(1705586390000L));
+ assertThat(discussion.getUpdatedAt().getTime(), is(1705586399000L));
+ assertThat(discussion.getAuthorAssociation(), is(GHCommentAuthorAssociation.OWNER));
+ assertThat(discussion.getActiveLockReason(), is(nullValue()));
+ assertThat(discussion.getBody(), is("Test question"));
+
+ GHRepositoryDiscussionComment comment = discussionCommentPayload.getComment();
+
+ assertThat(comment.getHtmlUrl().toString(),
+ is("https://github.com/gsmet/quarkus-bot-java-playground/discussions/162#discussioncomment-8169669"));
+ assertThat(comment.getId(), is(8169669L));
+ assertThat(comment.getNodeId(), is("DC_kwDOEq3cwc4AfKjF"));
+ assertThat(comment.getAuthorAssociation(), is(GHCommentAuthorAssociation.OWNER));
+ assertThat(comment.getCreatedAt().getTime(), is(1705586398000L));
+ assertThat(comment.getUpdatedAt().getTime(), is(1705586399000L));
+ assertThat(comment.getBody(), is("Test comment."));
+ assertThat(comment.getUser().getLogin(), is("gsmet"));
+ assertThat(comment.getUser().getId(), is(1279749L));
+ assertThat(comment.getUser().getNodeId(), is("MDQ6VXNlcjEyNzk3NDk="));
+ assertThat(comment.getParentId(), is(nullValue()));
+ assertThat(comment.getChildCommentCount(), is(0));
+ }
+
/**
* Starred.
*
diff --git a/src/test/resources/org/kohsuke/github/GHEventPayloadTest/discussion_comment_created.json b/src/test/resources/org/kohsuke/github/GHEventPayloadTest/discussion_comment_created.json
new file mode 100644
index 0000000000..dbcffc7863
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHEventPayloadTest/discussion_comment_created.json
@@ -0,0 +1,237 @@
+{
+ "action": "created",
+ "comment": {
+ "id": 8169669,
+ "node_id": "DC_kwDOEq3cwc4AfKjF",
+ "html_url": "https://github.com/gsmet/quarkus-bot-java-playground/discussions/162#discussioncomment-8169669",
+ "parent_id": null,
+ "child_comment_count": 0,
+ "repository_url": "gsmet/quarkus-bot-java-playground",
+ "discussion_id": 6090566,
+ "author_association": "OWNER",
+ "user": {
+ "login": "gsmet",
+ "id": 1279749,
+ "node_id": "MDQ6VXNlcjEyNzk3NDk=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1279749?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/gsmet",
+ "html_url": "https://github.com/gsmet",
+ "followers_url": "https://api.github.com/users/gsmet/followers",
+ "following_url": "https://api.github.com/users/gsmet/following{/other_user}",
+ "gists_url": "https://api.github.com/users/gsmet/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/gsmet/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/gsmet/subscriptions",
+ "organizations_url": "https://api.github.com/users/gsmet/orgs",
+ "repos_url": "https://api.github.com/users/gsmet/repos",
+ "events_url": "https://api.github.com/users/gsmet/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/gsmet/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "created_at": "2024-01-18T13:59:58Z",
+ "updated_at": "2024-01-18T13:59:59Z",
+ "body": "Test comment.",
+ "reactions": {
+ "url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/issues/comments/8169669/reactions",
+ "total_count": 0,
+ "+1": 0,
+ "-1": 0,
+ "laugh": 0,
+ "hooray": 0,
+ "confused": 0,
+ "heart": 0,
+ "rocket": 0,
+ "eyes": 0
+ }
+ },
+ "discussion": {
+ "repository_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground",
+ "category": {
+ "id": 33522033,
+ "node_id": "DIC_kwDOEq3cwc4B_4Fx",
+ "repository_id": 313384129,
+ "emoji": ":pray:",
+ "name": "Q&A",
+ "description": "Ask the community for help",
+ "created_at": "2021-11-15T16:50:31.000+01:00",
+ "updated_at": "2021-11-15T16:50:31.000+01:00",
+ "slug": "q-a",
+ "is_answerable": true
+ },
+ "answer_html_url": null,
+ "answer_chosen_at": null,
+ "answer_chosen_by": null,
+ "html_url": "https://github.com/gsmet/quarkus-bot-java-playground/discussions/162",
+ "id": 6090566,
+ "node_id": "D_kwDOEq3cwc4AXO9G",
+ "number": 162,
+ "title": "New test question",
+ "user": {
+ "login": "gsmet",
+ "id": 1279749,
+ "node_id": "MDQ6VXNlcjEyNzk3NDk=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1279749?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/gsmet",
+ "html_url": "https://github.com/gsmet",
+ "followers_url": "https://api.github.com/users/gsmet/followers",
+ "following_url": "https://api.github.com/users/gsmet/following{/other_user}",
+ "gists_url": "https://api.github.com/users/gsmet/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/gsmet/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/gsmet/subscriptions",
+ "organizations_url": "https://api.github.com/users/gsmet/orgs",
+ "repos_url": "https://api.github.com/users/gsmet/repos",
+ "events_url": "https://api.github.com/users/gsmet/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/gsmet/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "state": "open",
+ "state_reason": null,
+ "locked": false,
+ "comments": 1,
+ "created_at": "2024-01-18T13:59:50Z",
+ "updated_at": "2024-01-18T13:59:59Z",
+ "author_association": "OWNER",
+ "active_lock_reason": null,
+ "body": "Test question",
+ "reactions": {
+ "url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/discussions/162/reactions",
+ "total_count": 0,
+ "+1": 0,
+ "-1": 0,
+ "laugh": 0,
+ "hooray": 0,
+ "confused": 0,
+ "heart": 0,
+ "rocket": 0,
+ "eyes": 0
+ },
+ "timeline_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/discussions/162/timeline"
+ },
+ "repository": {
+ "id": 313384129,
+ "node_id": "MDEwOlJlcG9zaXRvcnkzMTMzODQxMjk=",
+ "name": "quarkus-bot-java-playground",
+ "full_name": "gsmet/quarkus-bot-java-playground",
+ "private": false,
+ "owner": {
+ "login": "gsmet",
+ "id": 1279749,
+ "node_id": "MDQ6VXNlcjEyNzk3NDk=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1279749?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/gsmet",
+ "html_url": "https://github.com/gsmet",
+ "followers_url": "https://api.github.com/users/gsmet/followers",
+ "following_url": "https://api.github.com/users/gsmet/following{/other_user}",
+ "gists_url": "https://api.github.com/users/gsmet/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/gsmet/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/gsmet/subscriptions",
+ "organizations_url": "https://api.github.com/users/gsmet/orgs",
+ "repos_url": "https://api.github.com/users/gsmet/repos",
+ "events_url": "https://api.github.com/users/gsmet/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/gsmet/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "html_url": "https://github.com/gsmet/quarkus-bot-java-playground",
+ "description": null,
+ "fork": false,
+ "url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground",
+ "forks_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/forks",
+ "keys_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/keys{/key_id}",
+ "collaborators_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/collaborators{/collaborator}",
+ "teams_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/teams",
+ "hooks_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/hooks",
+ "issue_events_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/issues/events{/number}",
+ "events_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/events",
+ "assignees_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/assignees{/user}",
+ "branches_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/branches{/branch}",
+ "tags_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/tags",
+ "blobs_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/git/blobs{/sha}",
+ "git_tags_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/git/tags{/sha}",
+ "git_refs_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/git/refs{/sha}",
+ "trees_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/git/trees{/sha}",
+ "statuses_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/statuses/{sha}",
+ "languages_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/languages",
+ "stargazers_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/stargazers",
+ "contributors_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/contributors",
+ "subscribers_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/subscribers",
+ "subscription_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/subscription",
+ "commits_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/commits{/sha}",
+ "git_commits_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/git/commits{/sha}",
+ "comments_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/comments{/number}",
+ "issue_comment_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/issues/comments{/number}",
+ "contents_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/contents/{+path}",
+ "compare_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/compare/{base}...{head}",
+ "merges_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/merges",
+ "archive_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/{archive_format}{/ref}",
+ "downloads_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/downloads",
+ "issues_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/issues{/number}",
+ "pulls_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/pulls{/number}",
+ "milestones_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/milestones{/number}",
+ "notifications_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/notifications{?since,all,participating}",
+ "labels_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/labels{/name}",
+ "releases_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/releases{/id}",
+ "deployments_url": "https://api.github.com/repos/gsmet/quarkus-bot-java-playground/deployments",
+ "created_at": "2020-11-16T17:55:53Z",
+ "updated_at": "2022-05-31T17:24:36Z",
+ "pushed_at": "2023-11-16T15:25:35Z",
+ "git_url": "git://github.com/gsmet/quarkus-bot-java-playground.git",
+ "ssh_url": "git@github.com:gsmet/quarkus-bot-java-playground.git",
+ "clone_url": "https://github.com/gsmet/quarkus-bot-java-playground.git",
+ "svn_url": "https://github.com/gsmet/quarkus-bot-java-playground",
+ "homepage": null,
+ "size": 122,
+ "stargazers_count": 1,
+ "watchers_count": 1,
+ "language": "Java",
+ "has_issues": true,
+ "has_projects": true,
+ "has_downloads": true,
+ "has_wiki": true,
+ "has_pages": false,
+ "has_discussions": true,
+ "forks_count": 2,
+ "mirror_url": null,
+ "archived": false,
+ "disabled": false,
+ "open_issues_count": 6,
+ "license": null,
+ "allow_forking": true,
+ "is_template": false,
+ "web_commit_signoff_required": false,
+ "topics": [],
+ "visibility": "public",
+ "forks": 2,
+ "open_issues": 6,
+ "watchers": 1,
+ "default_branch": "main"
+ },
+ "sender": {
+ "login": "gsmet",
+ "id": 1279749,
+ "node_id": "MDQ6VXNlcjEyNzk3NDk=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1279749?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/gsmet",
+ "html_url": "https://github.com/gsmet",
+ "followers_url": "https://api.github.com/users/gsmet/followers",
+ "following_url": "https://api.github.com/users/gsmet/following{/other_user}",
+ "gists_url": "https://api.github.com/users/gsmet/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/gsmet/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/gsmet/subscriptions",
+ "organizations_url": "https://api.github.com/users/gsmet/orgs",
+ "repos_url": "https://api.github.com/users/gsmet/repos",
+ "events_url": "https://api.github.com/users/gsmet/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/gsmet/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "installation": {
+ "id": 13005535,
+ "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMTMwMDU1MzU="
+ }
+}
\ No newline at end of file
From be00e5140dc84201f4707657b89cfe77d4e4d635 Mon Sep 17 00:00:00 2001
From: Fotis Koutoulakis
* {@code - * @Override - * public String getEncodedAuthorization() { - * return "Bearer myBearerToken"; - * } + * @Override + * public String getEncodedAuthorization() { + * return "Bearer myBearerToken"; + * } * } ** diff --git a/src/test/java/org/kohsuke/github/GHCheckRunBuilderTest.java b/src/test/java/org/kohsuke/github/GHCheckRunBuilderTest.java index a2594d307d..5b48eabd2d 100644 --- a/src/test/java/org/kohsuke/github/GHCheckRunBuilderTest.java +++ b/src/test/java/org/kohsuke/github/GHCheckRunBuilderTest.java @@ -74,7 +74,7 @@ public void createCheckRun() throws Exception { "hello to you too").withTitle("Look here")) .add(new GHCheckRunBuilder.Image("Unikitty", "https://i.pinimg.com/474x/9e/65/c0/9e65c0972294f1e10f648c9780a79fab.jpg") - .withCaption("Princess Unikitty"))) + .withCaption("Princess Unikitty"))) .add(new GHCheckRunBuilder.Action("Help", "what I need help with", "doit")) .create(); assertThat(checkRun.getStatus(), equalTo(Status.COMPLETED)); diff --git a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java index f4b680b5ef..2c2fc1fde1 100644 --- a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java +++ b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java @@ -84,8 +84,8 @@ public void testManualRunAndBasicInformation() throws IOException { GHWorkflowRun workflowRun = getWorkflowRun(FAST_WORKFLOW_NAME, MAIN_BRANCH, Status.COMPLETED, - latestPreexistingWorkflowRunId).orElseThrow( - () -> new IllegalStateException("We must have a valid workflow run starting from here")); + latestPreexistingWorkflowRunId) + .orElseThrow(() -> new IllegalStateException("We must have a valid workflow run starting from here")); assertThat(workflowRun.getWorkflowId(), equalTo(workflow.getId())); assertThat(workflowRun.getId(), notNullValue()); @@ -137,8 +137,8 @@ public void testCancelAndRerun() throws IOException { GHWorkflowRun workflowRun = getWorkflowRun(SLOW_WORKFLOW_NAME, MAIN_BRANCH, Status.IN_PROGRESS, - latestPreexistingWorkflowRunId).orElseThrow( - () -> new IllegalStateException("We must have a valid workflow run starting from here")); + latestPreexistingWorkflowRunId) + .orElseThrow(() -> new IllegalStateException("We must have a valid workflow run starting from here")); assertThat(workflowRun.getId(), notNullValue()); @@ -186,8 +186,8 @@ public void testDelete() throws IOException { GHWorkflowRun workflowRunToDelete = getWorkflowRun(FAST_WORKFLOW_NAME, MAIN_BRANCH, Status.COMPLETED, - latestPreexistingWorkflowRunId).orElseThrow( - () -> new IllegalStateException("We must have a valid workflow run starting from here")); + latestPreexistingWorkflowRunId) + .orElseThrow(() -> new IllegalStateException("We must have a valid workflow run starting from here")); assertThat(workflowRunToDelete.getId(), notNullValue()); @@ -224,8 +224,8 @@ public void testSearchOnBranch() throws IOException { GHWorkflowRun workflowRun = getWorkflowRun(FAST_WORKFLOW_NAME, SECOND_BRANCH, Status.COMPLETED, - latestPreexistingWorkflowRunId).orElseThrow( - () -> new IllegalStateException("We must have a valid workflow run starting from here")); + latestPreexistingWorkflowRunId) + .orElseThrow(() -> new IllegalStateException("We must have a valid workflow run starting from here")); assertThat(workflowRun.getWorkflowId(), equalTo(workflow.getId())); assertThat(workflowRun.getHeadBranch(), equalTo(SECOND_BRANCH)); @@ -326,8 +326,8 @@ public void testLogs() throws IOException { GHWorkflowRun workflowRun = getWorkflowRun(FAST_WORKFLOW_NAME, MAIN_BRANCH, Status.COMPLETED, - latestPreexistingWorkflowRunId).orElseThrow( - () -> new IllegalStateException("We must have a valid workflow run starting from here")); + latestPreexistingWorkflowRunId) + .orElseThrow(() -> new IllegalStateException("We must have a valid workflow run starting from here")); List
diff --git a/src/test/java/org/kohsuke/github/GHAppInstallationTest.java b/src/test/java/org/kohsuke/github/GHAppInstallationTest.java
index 1a380a9739..d6218d1121 100644
--- a/src/test/java/org/kohsuke/github/GHAppInstallationTest.java
+++ b/src/test/java/org/kohsuke/github/GHAppInstallationTest.java
@@ -3,11 +3,16 @@
import org.junit.Test;
import java.io.IOException;
+import java.time.LocalDateTime;
+import java.time.Month;
+import java.time.ZoneOffset;
+import java.util.Date;
import java.util.List;
import static org.hamcrest.Matchers.*;
// TODO: Auto-generated Javadoc
+
/**
* The Class GHAppInstallationTest.
*/
@@ -61,4 +66,23 @@ public void testGetMarketplaceAccount() throws IOException {
assertThat(plan.getType(), equalTo(GHMarketplaceAccountType.ORGANIZATION));
}
+ /**
+ * Test list installations, and one of the installations has been suspended.
+ *
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ @Test
+ public void testListSuspendedInstallation() throws IOException {
+ GHAppInstallation appInstallation = getAppInstallationWithToken(jwtProvider1.getEncodedAuthorization());
+
+ final GHUser suspendedBy = appInstallation.getSuspendedBy();
+ assertThat(suspendedBy.getLogin(), equalTo("gilday"));
+
+ final Date suspendedAt = appInstallation.getSuspendedAt();
+ final Date expectedSuspendedAt = Date
+ .from(LocalDateTime.of(2024, Month.FEBRUARY, 26, 2, 43, 12).toInstant(ZoneOffset.UTC));
+ assertThat(suspendedAt, equalTo(expectedSuspendedAt));
+ }
+
}
diff --git a/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/__files/1-app.json b/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/__files/1-app.json
new file mode 100644
index 0000000000..89a67cab2d
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/__files/1-app.json
@@ -0,0 +1,42 @@
+{
+ "id": 83009,
+ "slug": "cleanthat",
+ "node_id": "MDM6QXBwNjU1NTA=",
+ "owner": {
+ "login": "solven-eu",
+ "id": 34552197,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjM0NTUyMTk3",
+ "avatar_url": "https://avatars.githubusercontent.com/u/34552197?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/solven-eu",
+ "html_url": "https://github.com/solven-eu",
+ "followers_url": "https://api.github.com/users/solven-eu/followers",
+ "following_url": "https://api.github.com/users/solven-eu/following{/other_user}",
+ "gists_url": "https://api.github.com/users/solven-eu/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/solven-eu/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/solven-eu/subscriptions",
+ "organizations_url": "https://api.github.com/users/solven-eu/orgs",
+ "repos_url": "https://api.github.com/users/solven-eu/repos",
+ "events_url": "https://api.github.com/users/solven-eu/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/solven-eu/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "name": "CleanThat",
+ "description": "Cleanthat cleans branches automatically to fix/improve your code.\r\n\r\nFeatures :\r\n- Fix branches a pull_requests head\r\n- Open pull_request to fix protected branches\r\n- Format `.md`, `.java`, `.scala`, `.json`, `.yaml` with the help of [Spotless](https://github.com/diffplug/spotless)\r\n- Refactor `.java` files to improve code-style, security and stability",
+ "external_url": "https://github.com/solven-eu/cleanthat",
+ "html_url": "https://github.com/apps/cleanthat",
+ "created_at": "2020-05-19T13:45:43Z",
+ "updated_at": "2023-01-27T06:10:21Z",
+ "permissions": {
+ "checks": "write",
+ "contents": "write",
+ "metadata": "read",
+ "pull_requests": "write"
+ },
+ "events": [
+ "pull_request",
+ "push"
+ ],
+ "installations_count": 280
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/__files/2-app_installations.json b/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/__files/2-app_installations.json
new file mode 100644
index 0000000000..8514a67338
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/__files/2-app_installations.json
@@ -0,0 +1,61 @@
+[
+ {
+ "id": 12131496,
+ "account": {
+ "login": "hub4j-test-org",
+ "id": 7544739,
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjc1NDQ3Mzk=",
+ "avatar_url": "https://avatars3.githubusercontent.com/u/7544739?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/hub4j-test-org",
+ "html_url": "https://github.com/hub4j-test-org",
+ "followers_url": "https://api.github.com/users/hub4j-test-org/followers",
+ "following_url": "https://api.github.com/users/hub4j-test-org/following{/other_user}",
+ "gists_url": "https://api.github.com/users/hub4j-test-org/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/hub4j-test-org/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/hub4j-test-org/subscriptions",
+ "organizations_url": "https://api.github.com/users/hub4j-test-org/orgs",
+ "repos_url": "https://api.github.com/users/hub4j-test-org/repos",
+ "events_url": "https://api.github.com/users/hub4j-test-org/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/hub4j-test-org/received_events",
+ "type": "Organization",
+ "site_admin": false
+ },
+ "repository_selection": "selected",
+ "access_tokens_url": "https://api.github.com/app/installations/12131496/access_tokens",
+ "repositories_url": "https://api.github.com/installation/repositories",
+ "html_url": "https://github.com/organizations/hub4j-test-org/settings/installations/12131496",
+ "app_id": 83009,
+ "app_slug": "ghapi-test-app-2",
+ "target_id": 7544739,
+ "target_type": "Organization",
+ "permissions": {},
+ "events": [],
+ "created_at": "2020-09-30T15:05:32.000Z",
+ "updated_at": "2020-09-30T15:05:32.000Z",
+ "single_file_name": null,
+ "has_multiple_single_files": false,
+ "single_file_paths": [],
+ "suspended_by": {
+ "login": "gilday",
+ "id": 1431609,
+ "node_id": "MDQ6VXNlcjE0MzE2MDk=",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1431609?v=4",
+ "gravatar_id": "",
+ "url": "https://api.github.com/users/gilday",
+ "html_url": "https://github.com/gilday",
+ "followers_url": "https://api.github.com/users/gilday/followers",
+ "following_url": "https://api.github.com/users/gilday/following{/other_user}",
+ "gists_url": "https://api.github.com/users/gilday/gists{/gist_id}",
+ "starred_url": "https://api.github.com/users/gilday/starred{/owner}{/repo}",
+ "subscriptions_url": "https://api.github.com/users/gilday/subscriptions",
+ "organizations_url": "https://api.github.com/users/gilday/orgs",
+ "repos_url": "https://api.github.com/users/gilday/repos",
+ "events_url": "https://api.github.com/users/gilday/events{/privacy}",
+ "received_events_url": "https://api.github.com/users/gilday/received_events",
+ "type": "User",
+ "site_admin": false
+ },
+ "suspended_at": "2024-02-26T02:43:12Z"
+ }
+]
diff --git a/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/mappings/1-app.json b/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/mappings/1-app.json
new file mode 100644
index 0000000000..51181fa14b
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/mappings/1-app.json
@@ -0,0 +1,42 @@
+{
+ "id": "144fdb7f-667e-4cf4-bd37-67ed11bdc421",
+ "name": "app",
+ "request": {
+ "url": "/app",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.machine-man-preview+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "1-app.json",
+ "headers": {
+ "Server": "GitHub.com",
+ "Date": "Sun, 19 Mar 2023 13:02:50 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Cache-Control": "public, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept",
+ "Accept-Encoding, Accept, X-Requested-With"
+ ],
+ "ETag": "W/\"00fa67d861eb73a934cd9229b76c2dc7c2c235babf8d281e2dd4a1e31ca3b930\"",
+ "X-GitHub-Media-Type": "github.v3; param=machine-man-preview; format=json",
+ "x-github-api-version-selected": "2022-11-28",
+ "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+ "Access-Control-Allow-Origin": "*",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "0",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "C09A:5A83:172C70C:179D1FD:641707FA"
+ }
+ },
+ "uuid": "144fdb7f-667e-4cf4-bd37-67ed11bdc421",
+ "persistent": true,
+ "insertionIndex": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/mappings/2-app_installations.json b/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/mappings/2-app_installations.json
new file mode 100644
index 0000000000..abae32ba46
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHAppInstallationTest/wiremock/testListSuspendedInstallation/mappings/2-app_installations.json
@@ -0,0 +1,41 @@
+{
+ "id": "45ac2593-8123-49ae-ad1a-ded446491b14",
+ "name": "app_installations",
+ "request": {
+ "url": "/app/installations",
+ "method": "GET",
+ "headers": {
+ "Accept": {
+ "equalTo": "application/vnd.github.machine-man-preview+json"
+ }
+ }
+ },
+ "response": {
+ "status": 200,
+ "bodyFileName": "2-app_installations.json",
+ "headers": {
+ "Date": "Thu, 05 Nov 2020 20:42:31 GMT",
+ "Content-Type": "application/json; charset=utf-8",
+ "Server": "GitHub.com",
+ "Status": "200 OK",
+ "Cache-Control": "public, max-age=60, s-maxage=60",
+ "Vary": [
+ "Accept",
+ "Accept-Encoding, Accept, X-Requested-With",
+ "Accept-Encoding"
+ ],
+ "ETag": "W/\"60d3ec5c9014799f5e12b88e16e771a386b905ad8d41cd18aed34e58b11c58d4\"",
+ "X-GitHub-Media-Type": "github.v3; param=machine-man-preview; format=json",
+ "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+ "X-Frame-Options": "deny",
+ "X-Content-Type-Options": "nosniff",
+ "X-XSS-Protection": "1; mode=block",
+ "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+ "Content-Security-Policy": "default-src 'none'",
+ "X-GitHub-Request-Id": "9294:AE05:BDAC831:DB35870:5FA463B7"
+ }
+ },
+ "uuid": "45ac2593-8123-49ae-ad1a-ded446491b14",
+ "persistent": true,
+ "insertionIndex": 2
+}
\ No newline at end of file
From 1ebe446b7fccc30657019b17ac285970cdce2741 Mon Sep 17 00:00:00 2001
From: Guillaume Smet
diff --git a/src/main/java11/org/kohsuke/github/extras/HttpClientGitHubConnector.java b/src/main/java11/org/kohsuke/github/extras/HttpClientGitHubConnector.java
index e8eec47bfe..dd8556b9b8 100644
--- a/src/main/java11/org/kohsuke/github/extras/HttpClientGitHubConnector.java
+++ b/src/main/java11/org/kohsuke/github/extras/HttpClientGitHubConnector.java
@@ -31,7 +31,17 @@ public class HttpClientGitHubConnector implements GitHubConnector {
* Instantiates a new HttpClientGitHubConnector with a default HttpClient.
*/
public HttpClientGitHubConnector() {
- this(HttpClient.newBuilder().followRedirects(HttpClient.Redirect.NORMAL).build());
+ // GitHubClient handles redirects manually as Java HttpClient copies all the headers when redirecting
+ // even when redirecting to a different host which is problematic as we don't want
+ // to push the Authorization header when redirected to a different host.
+ // This problem was discovered when upload-artifact@v4 was released as the new
+ // service we are redirected to for downloading the artifacts doesn't support
+ // having the Authorization header set.
+ // The new implementation does not push the Authorization header when redirected
+ // to a different host, which is similar to what Okhttp is doing:
+ // https://github.com/square/okhttp/blob/f9dfd4e8cc070ca2875a67d8f7ad939d95e7e296/okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt#L313-L318
+ // See also https://github.com/arduino/report-size-deltas/pull/83 for more context
+ this(HttpClient.newBuilder().followRedirects(HttpClient.Redirect.NEVER).build());
}
/**
diff --git a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java
index 2c2fc1fde1..cda06a9ebf 100644
--- a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java
+++ b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java
@@ -355,6 +355,10 @@ public void testLogs() throws IOException {
@SuppressWarnings("resource")
@Test
public void testArtifacts() throws IOException {
+ // Recorded with Authorization, then manually updated
+ snapshotNotAllowed();
+
+ mockGitHub.customizeRecordSpec(recordSpecBuilder -> recordSpecBuilder.captureHeader("Authorization"));
GHWorkflow workflow = repo.getWorkflow(ARTIFACTS_WORKFLOW_PATH);
long latestPreexistingWorkflowRunId = getLatestPreexistingWorkflowRunId();
@@ -382,7 +386,7 @@ public void testArtifacts() throws IOException {
checkArtifactProperties(artifacts.get(0), "artifact1");
checkArtifactProperties(artifacts.get(1), "artifact2");
- // Test download
+ // Test download from upload-artifact@v3 infrastructure
String artifactContent = artifacts.get(0).download((is) -> {
try (ZipInputStream zis = new ZipInputStream(is)) {
StringBuilder sb = new StringBuilder();
@@ -400,7 +404,25 @@ public void testArtifacts() throws IOException {
}
});
- assertThat(artifactContent, is("artifact1"));
+ // Test download from upload-artifact@v4 infrastructure
+ artifactContent = artifacts.get(1).download((is) -> {
+ try (ZipInputStream zis = new ZipInputStream(is)) {
+ StringBuilder sb = new StringBuilder();
+
+ ZipEntry ze = zis.getNextEntry();
+ assertThat(ze.getName(), is("artifact2.txt"));
+
+ // the scanner has to be kept open to avoid closing zis
+ Scanner scanner = new Scanner(zis);
+ while (scanner.hasNextLine()) {
+ sb.append(scanner.nextLine());
+ }
+
+ return sb.toString();
+ }
+ });
+
+ assertThat(artifactContent, is("artifact2"));
// Test GHRepository#getArtifact(long) as we are sure we have artifacts around
GHArtifact artifactById = repo.getArtifact(artifacts.get(0).getId());
diff --git a/src/test/java/org/kohsuke/github/junit/GitHubWireMockRule.java b/src/test/java/org/kohsuke/github/junit/GitHubWireMockRule.java
index 93eeb39ff4..980a997e69 100644
--- a/src/test/java/org/kohsuke/github/junit/GitHubWireMockRule.java
+++ b/src/test/java/org/kohsuke/github/junit/GitHubWireMockRule.java
@@ -1,26 +1,30 @@
package org.kohsuke.github.junit;
import com.github.tomakehurst.wiremock.WireMockServer;
+import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
import com.github.tomakehurst.wiremock.common.FileSource;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.Parameters;
+import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;
import com.github.tomakehurst.wiremock.extension.ResponseTransformer;
import com.github.tomakehurst.wiremock.http.*;
import com.github.tomakehurst.wiremock.matching.RequestPatternBuilder;
import com.github.tomakehurst.wiremock.recording.RecordSpecBuilder;
import com.google.gson.*;
import edu.umd.cs.findbugs.annotations.NonNull;
+import org.apache.commons.io.FilenameUtils;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.nio.file.Paths;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Consumer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.annotation.Nonnull;
@@ -45,6 +49,12 @@ public class GitHubWireMockRule extends WireMockMultiServerRule {
private final static boolean useProxy = takeSnapshot
|| System.getProperty("test.github.useProxy", "false") != "false";
+ private final static Pattern ACTIONS_USER_CONTENT_PATTERN = Pattern
+ .compile("https://pipelines[a-z0-9]*\\.actions\\.githubusercontent\\.com", Pattern.CASE_INSENSITIVE);
+ private final static Pattern BLOB_CORE_WINDOWS_PATTERN = Pattern
+ .compile("https://([a-z0-9]*\\.blob\\.core\\.windows\\.net)", Pattern.CASE_INSENSITIVE);
+ private final static String ORIGINAL_HOST = "originalHost";
+
/**
* Customize record spec.
*
@@ -131,6 +141,15 @@ public WireMockServer actionsUserContentServer() {
return servers.get("actions-user-content");
}
+ /**
+ * Actions user content server.
+ *
+ * @return the wire mock server
+ */
+ public WireMockServer blobCoreWindowsNetServer() {
+ return servers.get("blob-core-windows-net");
+ }
+
/**
* Checks if is use proxy.
*
@@ -182,6 +201,11 @@ protected void initializeServers() {
|| isUseProxy()) {
initializeServer("actions-user-content");
}
+
+ if (new File(apiServer().getOptions().filesRoot().getPath() + "_blob-core-windows-net").exists()
+ || isUseProxy()) {
+ initializeServer("blob-core-windows-net", new ProxyToOriginalHostTransformer(this));
+ }
}
/**
@@ -213,6 +237,11 @@ protected void before() {
.stubFor(proxyAllTo("https://pipelines.actions.githubusercontent.com").atPriority(100));
}
+ if (this.blobCoreWindowsNetServer() != null) {
+ this.blobCoreWindowsNetServer()
+ .stubFor(any(anyUrl()).willReturn(aResponse().withTransformers(ProxyToOriginalHostTransformer.NAME))
+ .atPriority(100));
+ }
}
/**
@@ -235,6 +264,8 @@ protected void after() {
recordSnapshot(this.codeloadServer(), "https://codeload.github.com", true);
recordSnapshot(this.actionsUserContentServer(), "https://pipelines.actions.githubusercontent.com", true);
+
+ recordSnapshot(this.blobCoreWindowsNetServer(), "https://productionresults.blob.core.windows.net", true);
}
private void recordSnapshot(WireMockServer server, String target, boolean isRawServer) {
@@ -285,6 +316,77 @@ public static int getRequestCount(WireMockServer server) {
return server.countRequestsMatching(RequestPatternBuilder.allRequests().build()).getCount();
}
+ private static class MappingFileDetails {
+ final Path filePath;
+ final Path bodyPath; // body file from the mapping file contents
+ final Path renamedFilePath;
+ final Path renamedBodyPath;
+
+ MappingFileDetails(Path filePath, Map