Skip to content

TestFileWatcher/does_not_emit_events_for_empty_files/emits_a_create_event_once_something_is_written_to_the_empty_file #8087

TestFileWatcher/does_not_emit_events_for_empty_files/emits_a_create_event_once_something_is_written_to_the_empty_file

TestFileWatcher/does_not_emit_events_for_empty_files/emits_a_create_event_once_something_is_written_to_the_empty_file #8087

name: Add issue to Ingest project
on:
issues:
types:
- labeled
env:
INGEST_PROJECT_ID: 'PVT_kwDOAGc3Zs4AEzn4'
# GitHub labels for each team/area
DATA_PLANE_LABEL: 'Team:Elastic-Agent-Data-Plane'
CONTROL_PLANE_LABEL: 'Team:Elastic-Agent-Control-Plane'
ELASTIC_AGENT_LABEL: 'Team:Elastic-Agent'
# ID values for the Area property + its options
AREA_FIELD_ID: 'PVTSSF_lADOAGc3Zs4AEzn4zgEgZSo'
DATA_PLANE_OPTION_ID: '4f6b61c3'
permissions:
contents: read
jobs:
add_to_ingest_project:
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
id: add_to_project
if: ${{ github.event.label.name == env.DATA_PLANE_LABEL || github.event.label.name == env.CONTROL_PLANE_LABEL || github.event.label.name == env.ECOSYSTEM_LABEL || github.event.label.name == env.FLEET_LABEL }}
with:
query: |
# Variables have to be snake cased because of https://github.com/octokit/graphql-action/issues/164
mutation AddToIngestProject($project_id: ID!, $content_id: ID!) {
addProjectV2ItemById(input: { projectId: $project_id, contentId: $content_id }) {
item {
id
}
}
}
project_id: ${{ env.INGEST_PROJECT_ID }}
content_id: ${{ github.event.issue.node_id }}
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_ASSIGNER_TOKEN }}
- uses: octokit/[email protected]
id: set_elastic_agent_area
if: github.event.label.name == env.DATA_PLANE_LABEL || github.event.label.name == env.CONTROL_PLANE_LABEL || github.event.label.name == env.ELASTIC_AGENT_LABEL
with:
query: |
mutation updateIngestArea($item_id: ID!, $project_id: ID!, $area_field_id: ID!, $area_id: String) {
updateProjectV2ItemFieldValue(
input: { itemId: $item_id, projectId: $project_id, fieldId: $area_field_id, value: { singleSelectOptionId: $area_id } }) {
clientMutationId
}
}
item_id: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectV2ItemById.item.id }}
project_id: ${{ env.INGEST_PROJECT_ID }}
area_field_id: ${{ env.AREA_FIELD_ID }}
area_id: ${{ env.DATA_PLANE_OPTION_ID }}
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_ASSIGNER_TOKEN }}