merge-steward 0.32.1 → 0.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,12 +5,14 @@ const TOKEN_REFRESH_MS = 30 * 60_000;
5
5
  const TOKEN_EXPIRY_MARGIN_MS = 5 * 60_000;
6
6
  const RECENT_AUTH_FAILURE_WINDOW_MS = 15 * 60_000;
7
7
  const MAX_AUTH_FAILURES_TO_KEEP = 50;
8
+ const GITHUB_APP_JWT_MAX_LIFETIME_SECONDS = 10 * 60;
9
+ const GITHUB_APP_JWT_CLOCK_SKEW_SECONDS = 60;
8
10
  export function generateJwt(appId, privateKey) {
9
11
  const now = Math.floor(Date.now() / 1000);
10
12
  const header = Buffer.from(JSON.stringify({ alg: "RS256", typ: "JWT" })).toString("base64url");
11
13
  const payload = Buffer.from(JSON.stringify({
12
- iat: now - 60,
13
- exp: now + 600,
14
+ iat: now - GITHUB_APP_JWT_CLOCK_SKEW_SECONDS,
15
+ exp: now + GITHUB_APP_JWT_MAX_LIFETIME_SECONDS - GITHUB_APP_JWT_CLOCK_SKEW_SECONDS,
14
16
  iss: appId,
15
17
  })).toString("base64url");
16
18
  const signer = createSign("RSA-SHA256");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merge-steward",
3
- "version": "0.32.1",
3
+ "version": "0.32.2",
4
4
  "description": "Serial merge queue for GitHub — rebase, CI-gate, and merge PRs one at a time",
5
5
  "type": "module",
6
6
  "repository": {