GitXplorerGitXplorer
A

checklist

public
2 stars
0 forks
2 issues

Commits

List of commits on branch main.
Verified
2d2ff9e97ec1cdd18fb37c744be63cae7d880713

Update action.yml

AAhmedBaset committed 2 months ago
Unverified
e231a3eff208fc58a3c7472ec5a7f96cddfd0b31

feat: defaultInput

AAhmedBaset committed 2 months ago
Verified
de8b2d2769e01181c7f366a7f5e8d870a27f4a5c

Update action.yml

AAhmedBaset committed 2 months ago
Verified
54dc40873911e535a06081f79f63033a1cd62df3

Rename dependabot.yml to [disabled]-dependabot.yml

AAhmedBaset committed 4 months ago
Unverified
c361497cf4a31b7d87b44485c7118ce6dd262495

update dist

AAhmedBaset committed 8 months ago
Unverified
3588c6d6c48511dd25a989113ae8b5c2c0d06d6c

Merge branch 'main' of https://github.com/A7med3bdulBaset/checklist

AAhmedBaset committed 8 months ago

README

The README file for this repository.

Checklist Action

GitHub Action to detect checked and unchecked checkboxes in pull request descriptions.

Originally made to be used internally at a project of mine so it's not very flexible. Feel free to fork and adapt it to your needs.

Usage

First create a pull request description with your checkboxes. The action will check or uncheck the checkboxes based on the conditions you specify.

## CI

- [x] format
- [x] lint
- [x] typecheck
- [ ] e2e tests 

This Github Action will check checkbox status in pull request description and output the checked and unchecked checkboxes.

name: Integration Test
on:
  pull_request:

jobs:
  detect:
    runs-on: ubuntu-latest
    outputs:
      checked: ${{ steps.detect.outputs.checked }}
      unchecked: ${{ steps.detect.outputs.unchecked }}

    permissions:
      pull-requests: write

    steps:
      - name: Checkbox Trigger
        id: detect
        uses: a7med3bdulbaset/checklist
        with:
          token: ${{ github.token }}
          # initial PR template to append when no checkboxes are found
          template: |
            ## CI
            - [x] format
            - [x] lint
            - [x] typecheck
            - [ ] e2e tests
            
      - name: list changes
        run: |
          echo "checked=${{ steps.detect.outputs.checked }}"
          echo "unchecked=${{ steps.detect.outputs.unchecked }}

  test:
    name: format
    needs: [detect]
    if: ${{ contains(needs.detect.outputs.checked, 'format') }}
    runs-on: ubuntu-latest
    steps:
      # ...

  lint:
    name: lint
    needs: [detect]
    if: ${{ contains(needs.detect.outputs.checked, 'lint') }}
    runs-on: ubuntu-latest
    steps:
      # ...

The detect step will output two variables in similar format to the following:

checked=format,lint,typecheck
unchecked=e2e tests

Following inputs are available:

  • token: The GitHub token to use for authentication. Usually ${{ github.token }}
  • template: The PR template to use when no checkboxes are found. Leave empty to not update the PR description.

Publish

We use build-and-tag-action to publish a new release. Just push a new tag to the repository and the action will create a new release, including major, minor tags like v1 and v1.0

# increment release number
gh release create

License

Cloned from karlderkaefer/github-action-checkbox-trigger