Skip to content

Commit

Permalink
Revert "🔄 synced local '.github/workflows/' with remote 'workflows/' (#…
Browse files Browse the repository at this point in the history
…1249)"

This reverts commit f7d34a4.

Signed-off-by: Fran Mulero <[email protected]>
  • Loading branch information
fmulero committed Nov 23, 2023
1 parent f7d34a4 commit 6b8c21a
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 69 deletions.
62 changes: 56 additions & 6 deletions .github/workflows/comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,60 @@ on:
types:
- created
# Remove all permissions by default
permissions:
pull-requests: write
issues: write
permissions: {}
# Avoid concurrency over the same issue
concurrency:
group: card-movement-${{ github.event.issue.number }}
jobs:
call-comments-workflow:
uses: bitnami/support/.github/workflows/comment-created.yml@main
secrets: inherit
comments_handler:
runs-on: ubuntu-latest
permissions:
contents: read
repository-projects: write
issues: read
pull-requests: read
steps:
- name: Repo checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Load .env file
uses: xom9ikk/dotenv@de1ff27d319507880e6621e4d47424c677d95f68
with:
path: .github/workflows/
- name: Move into From Build Maintenance
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
# The comment was created by bitnami-bot in a pull_request created by bitnami-bot
if: ${{ github.actor == 'bitnami-bot' && github.event.issue.user.login == 'bitnami-bot' && github.event.issue.pull_request != null }}
with:
project-name: Support
column-name: Build Maintenance
# Required to trigger moving-cards.yml workflow (clean labels and assign people to work on it)
token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
- name: Move into Pending
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
if: |
(github.actor != 'bitnami-bot' || github.event.issue.user.login != 'bitnami-bot' || github.event.issue.pull_request == null) &&
contains(fromJson(env.BITNAMI_TEAM), github.actor) &&
(!contains(github.event.issue.labels.*.name, 'bitnami'))
with:
project-name: Support
column-name: Pending
- name: Move into In Progress
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
if: |
(github.actor != 'bitnami-bot' || github.event.issue.user.login != 'bitnami-bot' || github.event.issue.pull_request == null) &&
(!contains(fromJson(env.BITNAMI_TEAM), github.actor)) &&
contains(github.event.issue.labels.*.name, 'in-progress')
with:
project-name: Support
column-name: In progress
- name: Move into Triage
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
if: |
(github.actor != 'bitnami-bot' || github.event.issue.user.login != 'bitnami-bot' || github.event.issue.pull_request == null) &&
(!contains(fromJson(env.BITNAMI_TEAM), github.actor)) &&
(!contains(github.event.issue.labels.*.name, 'in-progress'))
with:
project-name: Support
column-name: Triage
# Needs reasignation of the task
token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
17 changes: 0 additions & 17 deletions .github/workflows/migration.yml

This file was deleted.

26 changes: 20 additions & 6 deletions .github/workflows/move-closed-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,24 @@ on:
pull_request_target:
types:
- closed
permissions:
issues: write
pull-requests: write
# Remove all permissions by default. Actions are performed by Bitnami Bot
permissions: {}
# Avoid concurrency over the same issue
concurrency:
group: card-movement-${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
jobs:
call-move-closed-workflow:
uses: bitnami/support/.github/workflows/item-closed.yml@main
secrets: inherit
send_to_solved:
runs-on: ubuntu-latest
steps:
- name: Send to the Solved column
id: send-solved
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
# Send to solve only the issues and PRs created by users or the automated PRs with human review required
if: |
(github.event.issue != null && github.event.issue.user.login != 'bitnami-bot') ||
(github.event.issue == null && (github.event.pull_request.user.login != 'bitnami-bot' || contains(github.event.pull_request.labels.*.name, 'review-required')))
with:
project-name: Support
column-name: 'Solved'
token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
issue-number: ${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
15 changes: 0 additions & 15 deletions .github/workflows/pr-reviews.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/reasign.yml

This file was deleted.

65 changes: 58 additions & 7 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,62 @@ on:
types:
- reopened
- opened
permissions:
contents: read
pull-requests: write
issues: write
# Remove all permissions by default
permissions: {}
# Avoid concurrency over the same issue
concurrency:
group: card-movement-${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
jobs:
call-triage-workflow:
uses: bitnami/support/.github/workflows/item-opened.yml@main
secrets: inherit
# For any opened or reopened issue, should be sent into Triage
send_to_board:
name: Organize triage
runs-on: ubuntu-latest
# Please note that projects cards are created/moved with Bitnami Bot
permissions:
contents: read
steps:
- name: Repo checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 1
- name: Load .env file
uses: xom9ikk/dotenv@de1ff27d319507880e6621e4d47424c677d95f68
with:
path: .github/workflows/
- name: Get author
id: get-issue
run: |
author="${{ github.event.issue != null && github.event.issue.user.login || github.event.pull_request.user.login }}"
number="${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}"
type="${{ github.event_name != 'issues' && 'pull_request' || 'issue' }}"
echo "author=${author}" >> $GITHUB_OUTPUT
echo "number=${number}" >> $GITHUB_OUTPUT
echo "type=${type}" >> $GITHUB_OUTPUT
- name: Send to the board
if: ${{steps.get-issue.outputs.author != 'bitnami-bot' || steps.get-issue.outputs.type != 'pull_request'}}
uses: peter-evans/create-or-update-project-card@dfa240db6fe287ceb681e45d6728c1af70452c58
with:
project-name: Support
# If the author comes from Bitnami, send it to Bitnami. Otherwise, all to Triage
column-name: ${{ (contains(fromJson(env.BITNAMI_TEAM), steps.get-issue.outputs.author)) && 'From Bitnami' || 'Triage' }}
token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
issue-number: ${{ steps.get-issue.outputs.number }}
labeling:
name: Set labels for Automated PRs
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: ${{ github.event_name != 'issues' && github.event.pull_request.user.login == 'bitnami-bot' }}
# The project API is not efficient and requires several requests to create the project card. For that reason we decided to create
# a card for the automated PRs only when it is needed.
steps:
- name: From Bitnami labeling
uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da
with:
add-labels: 'automated, auto-merge'
- name: Verify labeling
uses: fmulero/labeler@f49bf680252fc8ac12cbebb6e0ed8ea19d0712da
with:
# Bitnami bot token is required to trigger CI workflows
repo-token: ${{ secrets.BITNAMI_BOT_TOKEN }}
add-labels: verify

0 comments on commit 6b8c21a

Please sign in to comment.