Skip to content
Merged
Show file tree
Hide file tree
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
37 changes: 37 additions & 0 deletions .github/workflows/default-pr-to-draft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Default PR to Draft

on:
pull_request_target:
types: [opened]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}

jobs:
default-to-draft:
name: Convert PR to draft and add label
runs-on: ubuntu-latest
permissions:
pull-requests: write # Convert PR to draft and add "Mark Ready When Ready" label
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit

- name: Convert to draft
if: github.event.pull_request.draft == false
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr ready --undo ${{ github.event.pull_request.number }} --repo ${{ github.repository }}

- name: Add Mark Ready When Ready label
if: "!contains(github.event.pull_request.labels.*.name, 'Mark Ready When Ready')"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr edit ${{ github.event.pull_request.number }} --add-label "Mark Ready When Ready" --repo ${{ github.repository }}
34 changes: 34 additions & 0 deletions .github/workflows/mark-ready-when-ready.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Mark PR Ready When Ready

on:
pull_request_target:
types: [opened, edited, labeled, unlabeled, synchronize]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}

jobs:
mark-ready:
name: Mark as ready after successful checks
runs-on: ubuntu-latest
permissions:
checks: read # Read CI check results to determine if PR is ready
contents: write # Required by kenyonj/mark-ready-when-ready action
pull-requests: write # Mark the draft PR as ready for review
statuses: read # Read commit statuses to determine if PR is ready
if: |
contains(github.event.pull_request.labels.*.name, 'Mark Ready When Ready') &&
github.event.pull_request.draft == true
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit

- name: Mark ready when ready
uses: kenyonj/mark-ready-when-ready@0ef6176fc2ddef5bab6cb4ab9517a37f0c153ba4 # v1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Argo Helm is a collection of **community maintained** charts. Therefore we rely
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests. See the above stated requirements for PR on this project.

> **Note**
> Please create a separate Pull Request for each chart.
> e.g: If your changes involve both argo-cd and argo-rollouts, please submit one PR for argo-cd and another separate.
> Please start your pull request in draft mode and add the `Mark Ready When Ready` label to your PR. This will transition your PR automatically to ready when all of the checks have passed. This allows you to iterate on your PR if failures occur without notifying maintainers to review it until it is ready. Thank you for your understanding and cooperation.

### Pull Request Title Linting

Expand Down