Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create elastic-agent-pull-requests.yml #30177

Merged
merged 3 commits into from
Feb 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/elastic-agent-pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Add to Elastic Agent Data Plane or Control Plane Board
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: If you shorten the title, this looks more descriptive.

Screenshot 2022-02-04 at 09 35 40

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup it keeps only the last run in it.

on:
pull_request:
types:
- labeled
jobs:
add_to_data_plane-project:
runs-on: ubuntu-latest
if: |
github.event.label.name == 'Team:Elastic-Agent-Data-Plane'
steps:
- uses: octokit/[email protected]
id: add_to_project
with:
query: |
mutation add_to_project($projectid:String!,$contentid:String!) {
updatePullRequest(input: {pullRequestId:$contentid, projectIds:$projectid}) {
clientMutationId
}
}
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.pull_request.node_id }}
env:
PROJECT_ID: "PRO_kwDOAGc3Zs4AzG8z"
GITHUB_TOKEN: ${{ secrets.ELASTIC_AGENT_PROJECT_BOARD_TOKEN }}
add_to_control_plane-project:
runs-on: ubuntu-latest
if: |
github.event.label.name == 'Team:Elastic-Agent-Control-Plane'
steps:
- uses: octokit/[email protected]
id: add_to_project
with:
query: |
mutation add_to_project($projectid:String!,$contentid:String!) {
updatePullRequest(input: {pullRequestId:$contentid, projectIds:$projectid}) {
clientMutationId
}
}
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.pull_request.node_id }}
env:
PROJECT_ID: "PRO_kwDOAGc3Zs4AzG9E"
GITHUB_TOKEN: ${{ secrets.ELASTIC_AGENT_PROJECT_BOARD_TOKEN }}