From bdbe382f29e6ef3e0b1eaafaa4267a5846f79e52 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 4 Sep 2026 23:30:04 +0000 Subject: [PATCH 1/5] Initial plan From f3c4d5143681552465aa32ae446e93a0e7f9e1b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 4 Sep 2026 23:45:15 +0000 Subject: [PATCH 2/5] Fix external issue smoke outputs Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/smoke-issues.lock.yml | 4 ++-- .github/workflows/smoke-issues.md | 2 ++ actions/setup/js/linear_create_issue.cjs | 21 +++++++++++++++++-- actions/setup/js/linear_safe_outputs.test.cjs | 15 ++++++++----- 4 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/workflows/smoke-issues.lock.yml b/.github/workflows/smoke-issues.lock.yml index 4a844a81edf..ab9fd0e753d 100644 --- a/.github/workflows/smoke-issues.lock.yml +++ b/.github/workflows/smoke-issues.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"fa99958ed87fdec7c04689bd03680be6a3ab4b2b1508989857d22c9c0fccf7ea","body_hash":"8b1f00fc00aca4ac89a72c3817ea763c5f153ba05378410608a30060a2f1caed","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.80"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"585cdf44dc8f9248cb2748732a9d7ad532d804af237b55ad1f6b9f605f9e8777","body_hash":"8b1f00fc00aca4ac89a72c3817ea763c5f153ba05378410608a30060a2f1caed","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.80"}} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN","JIRA_API_TOKEN","JIRA_USER_EMAIL","LINEAR_API_KEY"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.28.13","digest":"sha256:78aeb1eee876d1ebae5eef26402bd9f31112850d42016a240002d1da57203e15","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.28.13@sha256:78aeb1eee876d1ebae5eef26402bd9f31112850d42016a240002d1da57203e15"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.13","digest":"sha256:61f12dcff38eb008b645d87a5541763452f409d9040eb243718764944167b1a2","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.13@sha256:61f12dcff38eb008b645d87a5541763452f409d9040eb243718764944167b1a2"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.28.13","digest":"sha256:58a8dc5be3fbafeef7da0532c38bd9047f86bf1b3c4cfd7d9b7d8d28e80a2b56","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.28.13@sha256:58a8dc5be3fbafeef7da0532c38bd9047f86bf1b3c4cfd7d9b7d8d28e80a2b56"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.15","digest":"sha256:60cd97533e93d8e7be36b979c0f08a70846189bda6190f28bbd6d427bc0d9b6e","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.15@sha256:60cd97533e93d8e7be36b979c0f08a70846189bda6190f28bbd6d427bc0d9b6e"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e","pinned_image":"ghcr.io/github/gh-aw-node@sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e"},{"image":"ghcr.io/github/github-mcp-server:v1.11.0","digest":"sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699","pinned_image":"ghcr.io/github/github-mcp-server:v1.11.0@sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699"}],"mcp_servers":[{"name":"github","tools":["get_commit","get_file_contents","get_latest_release","get_me","get_pull_request","get_pull_request_comments","get_pull_request_diff","get_pull_request_files","get_pull_request_review_comments","get_pull_request_reviews","get_pull_request_status","get_release_by_tag","get_tag","issue_read","list_branches","list_commits","list_issue_types","list_issues","list_pull_requests","list_releases","list_starred_repositories","list_tags","pull_request_read","search_code","search_issues","search_pull_requests","search_repositories"]},{"name":"safeoutputs","tools":["jira_create_issue","linear_create_issue","missing_data","missing_tool","noop"]}]} # This file was automatically generated by gh-aw. DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # @@ -1786,7 +1786,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} - JIRA_BASE_URL: ${{ vars.JIRA_BASE_URL }} + JIRA_BASE_URL: https://pelidehalleux.atlassian.net JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} GH_AW_LINEAR_TOKEN: ${{ secrets.LINEAR_API_KEY }} GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} diff --git a/.github/workflows/smoke-issues.md b/.github/workflows/smoke-issues.md index ab7e9896fc8..4ac7c6dfcbe 100644 --- a/.github/workflows/smoke-issues.md +++ b/.github/workflows/smoke-issues.md @@ -11,6 +11,8 @@ permissions: actions: read engine: copilot safe-outputs: + env: + JIRA_BASE_URL: https://pelidehalleux.atlassian.net linear-create-issue: team-id: "9cfb482a-81e3-4154-b5b9-2c805e70a02d" project-id: "810f57a7e383" diff --git a/actions/setup/js/linear_create_issue.cjs b/actions/setup/js/linear_create_issue.cjs index 4d27a82b4a6..6175f9f8b6f 100644 --- a/actions/setup/js/linear_create_issue.cjs +++ b/actions/setup/js/linear_create_issue.cjs @@ -22,6 +22,14 @@ const LINEAR_CREATE_ISSUE = `mutation LinearCreateIssue($input: IssueCreateInput } }`; +const LINEAR_RESOLVE_PROJECT = `query ResolveLinearProject($slugId: String!) { + projects(filter: { slugId: { eq: $slugId } }, first: 1) { + nodes { + id + } + } +}`; + async function main(config = {}) { const teamId = config.team_id; if (typeof teamId !== "string" || !LINEAR_UUID_PATTERN.test(teamId)) { @@ -56,7 +64,16 @@ async function main(config = {}) { const input = { teamId, title, description }; if (projectId) { - input.projectId = projectId; + if (LINEAR_UUID_PATTERN.test(projectId)) { + input.projectId = projectId; + } else { + const projectData = await linearGraphQL(LINEAR_RESOLVE_PROJECT, { slugId: projectId }); + const resolvedProjectId = projectData?.projects?.nodes?.[0]?.id; + if (typeof resolvedProjectId !== "string" || !LINEAR_UUID_PATTERN.test(resolvedProjectId)) { + throw new Error(`${ERR_CONFIG}: linear_create_issue could not resolve the configured project ID`); + } + input.projectId = resolvedProjectId; + } } const data = await linearGraphQL(LINEAR_CREATE_ISSUE, { input }); const payload = data?.issueCreate; @@ -72,4 +89,4 @@ async function main(config = {}) { }; } -module.exports = { LINEAR_CREATE_ISSUE, main }; +module.exports = { LINEAR_CREATE_ISSUE, LINEAR_RESOLVE_PROJECT, main }; diff --git a/actions/setup/js/linear_safe_outputs.test.cjs b/actions/setup/js/linear_safe_outputs.test.cjs index 0278fb4044e..02698618f6a 100644 --- a/actions/setup/js/linear_safe_outputs.test.cjs +++ b/actions/setup/js/linear_safe_outputs.test.cjs @@ -3,7 +3,7 @@ import { createRequire } from "module"; const require = createRequire(import.meta.url); const { LINEAR_GRAPHQL_ENDPOINT, linearGraphQL } = require("./linear_graphql.cjs"); -const { LINEAR_CREATE_ISSUE, main: createIssue } = require("./linear_create_issue.cjs"); +const { LINEAR_CREATE_ISSUE, LINEAR_RESOLVE_PROJECT, main: createIssue } = require("./linear_create_issue.cjs"); const { LINEAR_COMMENT_CREATE, main: addComment } = require("./linear_add_comment.cjs"); const { LINEAR_UPDATE_ISSUE, main: updateIssue } = require("./linear_update_issue.cjs"); @@ -30,23 +30,28 @@ describe("Linear safe outputs", () => { }); it("posts fixed GraphQL documents with variables and raw API-key authorization", async () => { - fetch.mockResolvedValue(response({ data: { issueCreate: { success: true, issue: { id: "id", identifier: "ENG-1", title: "Safe title" } } } })); + fetch + .mockResolvedValueOnce(response({ data: { projects: { nodes: [{ id: "a3f91a0b-6d71-4c58-a4bb-72b925bbebc8" }] } } })) + .mockResolvedValueOnce(response({ data: { issueCreate: { success: true, issue: { id: "id", identifier: "ENG-1", title: "Safe title" } } } })); const handler = await createIssue({ team_id: "9cfb482a-81e3-4154-b5b9-2c805e70a02d", project_id: "810f57a7e383" }); await handler({ title: "Safe title", body: "Detailed hello to @user" }); - expect(fetch).toHaveBeenCalledWith( + expect(fetch).toHaveBeenNthCalledWith( + 1, LINEAR_GRAPHQL_ENDPOINT, expect.objectContaining({ method: "POST", headers: { "Content-Type": "application/json", Authorization: "linear-secret" }, }) ); - const request = JSON.parse(fetch.mock.calls[0][1].body); + const projectRequest = JSON.parse(fetch.mock.calls[0][1].body); + expect(projectRequest).toEqual({ query: LINEAR_RESOLVE_PROJECT, variables: { slugId: "810f57a7e383" } }); + const request = JSON.parse(fetch.mock.calls[1][1].body); expect(request.query).toBe(LINEAR_CREATE_ISSUE); expect(request.query).not.toContain("Safe title"); expect(request.variables.input).toEqual({ teamId: "9cfb482a-81e3-4154-b5b9-2c805e70a02d", - projectId: "810f57a7e383", + projectId: "a3f91a0b-6d71-4c58-a4bb-72b925bbebc8", title: "Safe title", description: "Detailed hello to `@user`", }); From 5d708328735d7d053394e08f0ce6b6bf81347dad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 4 Sep 2026 23:50:21 +0000 Subject: [PATCH 3/5] Apply remaining changes Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/schemas/github-workflow.json | 175 +++++++++++----------- 1 file changed, 91 insertions(+), 84 deletions(-) diff --git a/pkg/workflow/schemas/github-workflow.json b/pkg/workflow/schemas/github-workflow.json index 23083e8951d..e65d2332ab1 100644 --- a/pkg/workflow/schemas/github-workflow.json +++ b/pkg/workflow/schemas/github-workflow.json @@ -1944,110 +1944,117 @@ }, "workflow_call": { "$comment": "https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#workflow_call", - "type": "object", "description": "Allows workflows to be reused by other workflows.", - "properties": { - "inputs": { - "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onworkflow_callinputs", - "description": "When using the workflow_call keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow.", + "oneOf": [ + { + "type": "null" + }, + { "type": "object", - "patternProperties": { - "^[_a-zA-Z][a-zA-Z0-9_-]*$": { - "$comment": "https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_id", - "description": "A string identifier to associate with the input. The value of is a map of the input's metadata. The must be a unique identifier within the inputs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", + "properties": { + "inputs": { + "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onworkflow_callinputs", + "description": "When using the workflow_call keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow.", "type": "object", - "properties": { - "description": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddescription", - "description": "A string description of the input parameter.", - "type": "string" - }, - "required": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_idrequired", - "description": "A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.", - "type": "boolean" - }, - "type": { - "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callinput_idtype", - "description": "Required if input is defined for the on.workflow_call keyword. The value of this parameter is a string specifying the data type of the input. This must be one of: boolean, number, or string.", - "type": "string", - "enum": ["boolean", "number", "string"] - }, - "default": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddefault", - "description": "The default value is used when an input parameter isn't specified in a workflow file.", - "anyOf": [ - { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$comment": "https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_id", + "description": "A string identifier to associate with the input. The value of is a map of the input's metadata. The must be a unique identifier within the inputs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", + "type": "object", + "properties": { + "description": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddescription", + "description": "A string description of the input parameter.", + "type": "string" + }, + "required": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_idrequired", + "description": "A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.", "type": "boolean" }, - { - "type": "number" + "type": { + "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callinput_idtype", + "description": "Required if input is defined for the on.workflow_call keyword. The value of this parameter is a string specifying the data type of the input. This must be one of: boolean, number, or string.", + "type": "string", + "enum": ["boolean", "number", "string"] }, - { - "type": "string" + "default": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddefault", + "description": "The default value is used when an input parameter isn't specified in a workflow file.", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] } - ] + }, + "required": ["type"], + "additionalProperties": false } }, - "required": ["type"], "additionalProperties": false - } - }, - "additionalProperties": false - }, - "outputs": { - "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onworkflow_calloutputs", - "description": "When using the workflow_call keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow.", - "type": "object", - "patternProperties": { - "^[_a-zA-Z][a-zA-Z0-9_-]*$": { - "$comment": "https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#outputsoutput_id", - "description": "A string identifier to associate with the output. The value of is a map of the output's metadata. The must be a unique identifier within the outputs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", + }, + "outputs": { + "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onworkflow_calloutputs", + "description": "When using the workflow_call keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow.", "type": "object", - "properties": { - "description": { - "$comment": "https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#outputsoutput_iddescription", - "description": "A string description of the output parameter.", - "type": "string" - }, - "value": { - "$comment": "https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#outputsoutput_idvalue", - "description": "The value that the output parameter will be mapped to. You can set this to a string or an expression with context. For example, you can use the steps context to set the value of an output to the output value of a step.", - "type": "string" + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$comment": "https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#outputsoutput_id", + "description": "A string identifier to associate with the output. The value of is a map of the output's metadata. The must be a unique identifier within the outputs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", + "type": "object", + "properties": { + "description": { + "$comment": "https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#outputsoutput_iddescription", + "description": "A string description of the output parameter.", + "type": "string" + }, + "value": { + "$comment": "https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#outputsoutput_idvalue", + "description": "The value that the output parameter will be mapped to. You can set this to a string or an expression with context. For example, you can use the steps context to set the value of an output to the output value of a step.", + "type": "string" + } + }, + "required": ["value"], + "additionalProperties": false } }, - "required": ["value"], "additionalProperties": false - } - }, - "additionalProperties": false - }, - "secrets": { - "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callsecrets", - "type": "object", - "description": "A map of the secrets that can be used in the called workflow. Within the called workflow, you can use the secrets context to refer to a secret.", - "patternProperties": { - "^[_a-zA-Z][a-zA-Z0-9_-]*$": { - "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callsecretssecret_id", + }, + "secrets": { + "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callsecrets", "type": "object", - "description": "A string identifier to associate with the secret.", - "properties": { - "description": { - "description": "A string description of the secret parameter.", - "type": "string" - }, - "required": { - "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callsecretssecret_idrequired", - "description": "A boolean specifying whether the secret must be supplied.", - "type": "boolean" + "description": "A map of the secrets that can be used in the called workflow. Within the called workflow, you can use the secrets context to refer to a secret.", + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callsecretssecret_id", + "type": "object", + "description": "A string identifier to associate with the secret.", + "properties": { + "description": { + "description": "A string description of the secret parameter.", + "type": "string" + }, + "required": { + "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callsecretssecret_idrequired", + "description": "A boolean specifying whether the secret must be supplied.", + "type": "boolean" + } + }, + "additionalProperties": false } }, "additionalProperties": false } - }, - "additionalProperties": false + } } - } + ] }, "workflow_dispatch": { "$comment": "https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/", From e7c1ab8d99dc8c0061ea661dc696a5622c22ad7d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 5 Sep 2026 01:28:14 +0000 Subject: [PATCH 4/5] Default Jira base URL in compiler Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/aw/safe-outputs-content.md | 2 +- .github/workflows/smoke-issues.lock.yml | 2 +- .github/workflows/smoke-issues.md | 2 -- pkg/constants/tool_constants.go | 2 +- pkg/workflow/jira_test.go | 13 +++++++++++++ 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/aw/safe-outputs-content.md b/.github/aw/safe-outputs-content.md index 5b2f5f3362d..d7725e8df33 100644 --- a/.github/aw/safe-outputs-content.md +++ b/.github/aw/safe-outputs-content.md @@ -25,7 +25,7 @@ description: Safe-output reference for issue, discussion, comment, and pull requ | `jira-add-comment` | `jira_add_comment` | `issue_key`, `body` | | `jira-add-label` | `jira_add_label` | `issue_key`, `label` | - Use the Jira-prefixed tool whenever the target is Jira. Unprefixed issue, comment, and label tools target GitHub. The compiler supplies `JIRA_BASE_URL` from `vars.JIRA_BASE_URL` and `JIRA_USER_EMAIL` and `JIRA_API_TOKEN` from same-named secrets; `safe-outputs.env` may override them. Description and comment strings are converted to ADF internally. Label addition is additive and preserves existing labels. Each Jira output supports `max` and `staged`; staged mode sends no HTTP request and does not require credentials. + Use the Jira-prefixed tool whenever the target is Jira. Unprefixed issue, comment, and label tools target GitHub. The compiler supplies `JIRA_BASE_URL` and supplies `JIRA_USER_EMAIL` and `JIRA_API_TOKEN` from same-named secrets; `safe-outputs.env` may override them. Description and comment strings are converted to ADF internally. Label addition is additive and preserves existing labels. Each Jira output supports `max` and `staged`; staged mode sends no HTTP request and does not require credentials. Jira update, comment, and label operations require a known issue key. Same-run references to an issue created by `jira_create_issue` are not supported. The initial integration does not provide transitions, assignments, custom fields, label removal, JQL, bulk operations, or arbitrary REST calls. diff --git a/.github/workflows/smoke-issues.lock.yml b/.github/workflows/smoke-issues.lock.yml index ab9fd0e753d..11ea31f6a79 100644 --- a/.github/workflows/smoke-issues.lock.yml +++ b/.github/workflows/smoke-issues.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"585cdf44dc8f9248cb2748732a9d7ad532d804af237b55ad1f6b9f605f9e8777","body_hash":"8b1f00fc00aca4ac89a72c3817ea763c5f153ba05378410608a30060a2f1caed","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.80"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"fa99958ed87fdec7c04689bd03680be6a3ab4b2b1508989857d22c9c0fccf7ea","body_hash":"8b1f00fc00aca4ac89a72c3817ea763c5f153ba05378410608a30060a2f1caed","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.80"}} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN","JIRA_API_TOKEN","JIRA_USER_EMAIL","LINEAR_API_KEY"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.28.13","digest":"sha256:78aeb1eee876d1ebae5eef26402bd9f31112850d42016a240002d1da57203e15","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.28.13@sha256:78aeb1eee876d1ebae5eef26402bd9f31112850d42016a240002d1da57203e15"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.13","digest":"sha256:61f12dcff38eb008b645d87a5541763452f409d9040eb243718764944167b1a2","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.13@sha256:61f12dcff38eb008b645d87a5541763452f409d9040eb243718764944167b1a2"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.28.13","digest":"sha256:58a8dc5be3fbafeef7da0532c38bd9047f86bf1b3c4cfd7d9b7d8d28e80a2b56","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.28.13@sha256:58a8dc5be3fbafeef7da0532c38bd9047f86bf1b3c4cfd7d9b7d8d28e80a2b56"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.15","digest":"sha256:60cd97533e93d8e7be36b979c0f08a70846189bda6190f28bbd6d427bc0d9b6e","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.15@sha256:60cd97533e93d8e7be36b979c0f08a70846189bda6190f28bbd6d427bc0d9b6e"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e","pinned_image":"ghcr.io/github/gh-aw-node@sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e"},{"image":"ghcr.io/github/github-mcp-server:v1.11.0","digest":"sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699","pinned_image":"ghcr.io/github/github-mcp-server:v1.11.0@sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699"}],"mcp_servers":[{"name":"github","tools":["get_commit","get_file_contents","get_latest_release","get_me","get_pull_request","get_pull_request_comments","get_pull_request_diff","get_pull_request_files","get_pull_request_review_comments","get_pull_request_reviews","get_pull_request_status","get_release_by_tag","get_tag","issue_read","list_branches","list_commits","list_issue_types","list_issues","list_pull_requests","list_releases","list_starred_repositories","list_tags","pull_request_read","search_code","search_issues","search_pull_requests","search_repositories"]},{"name":"safeoutputs","tools":["jira_create_issue","linear_create_issue","missing_data","missing_tool","noop"]}]} # This file was automatically generated by gh-aw. DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # diff --git a/.github/workflows/smoke-issues.md b/.github/workflows/smoke-issues.md index 4ac7c6dfcbe..ab7e9896fc8 100644 --- a/.github/workflows/smoke-issues.md +++ b/.github/workflows/smoke-issues.md @@ -11,8 +11,6 @@ permissions: actions: read engine: copilot safe-outputs: - env: - JIRA_BASE_URL: https://pelidehalleux.atlassian.net linear-create-issue: team-id: "9cfb482a-81e3-4154-b5b9-2c805e70a02d" project-id: "810f57a7e383" diff --git a/pkg/constants/tool_constants.go b/pkg/constants/tool_constants.go index 28790878b7f..6d7d45e3a43 100644 --- a/pkg/constants/tool_constants.go +++ b/pkg/constants/tool_constants.go @@ -3,7 +3,7 @@ package constants const ( LinearMCPReadOnlyURL = "https://mcp.linear.app/mcp/readonly" LinearMCPDefaultTokenExpr = "${{ secrets.LINEAR_API_KEY }}" - JiraBaseURLExpr = "${{ vars.JIRA_BASE_URL }}" + JiraBaseURLExpr = "https://pelidehalleux.atlassian.net" JiraUserEmailExpr = "${{ secrets.JIRA_USER_EMAIL }}" JiraAPITokenExpr = "${{ secrets.JIRA_API_TOKEN }}" ) diff --git a/pkg/workflow/jira_test.go b/pkg/workflow/jira_test.go index e4022a8856d..2c1280df9e6 100644 --- a/pkg/workflow/jira_test.go +++ b/pkg/workflow/jira_test.go @@ -71,6 +71,7 @@ func TestJiraCredentialsAreAddedOnlyToProcessorStep(t *testing.T) { "OTHER": "value", }, } + steps := make([]string, 3, 8) copy(steps, []string{ " - name: Process Safe Outputs\n", @@ -89,3 +90,15 @@ func TestJiraCredentialsAreAddedOnlyToProcessorStep(t *testing.T) { NewCompiler().addCustomSafeOutputEnvVars(&customSteps, &WorkflowData{SafeOutputs: config}) assert.Equal(t, " OTHER: value\n", strings.Join(customSteps, "")) } + +func TestJiraCredentialsUseDefaultBaseURL(t *testing.T) { + config := &SafeOutputsConfig{JiraCreateIssue: &JiraSafeOutputConfig{}} + steps := []string{ + " - name: Process Safe Outputs\n", + " env:\n", + " with:\n", + } + + rendered := strings.Join(injectJiraCredentialsIntoProcessorStep(steps, config), "") + assert.Contains(t, rendered, "JIRA_BASE_URL: https://pelidehalleux.atlassian.net") +} From 21a7408454fd9fa76e0f83be7de93ac7be7632e8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 5 Sep 2026 01:34:42 +0000 Subject: [PATCH 5/5] Keep Jira default test in sync Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/jira_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/workflow/jira_test.go b/pkg/workflow/jira_test.go index 2c1280df9e6..7965cd88047 100644 --- a/pkg/workflow/jira_test.go +++ b/pkg/workflow/jira_test.go @@ -4,6 +4,7 @@ import ( "strings" "testing" + "github.com/github/gh-aw/pkg/constants" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -100,5 +101,5 @@ func TestJiraCredentialsUseDefaultBaseURL(t *testing.T) { } rendered := strings.Join(injectJiraCredentialsIntoProcessorStep(steps, config), "") - assert.Contains(t, rendered, "JIRA_BASE_URL: https://pelidehalleux.atlassian.net") + assert.Contains(t, rendered, "JIRA_BASE_URL: "+constants.JiraBaseURLExpr) }