Skip to content

docs: adds guidelines for contributors #419

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

Merged
merged 8 commits into from
Jun 18, 2025
Merged

docs: adds guidelines for contributors #419

merged 8 commits into from
Jun 18, 2025

Conversation

latin-panda
Copy link
Collaborator

@latin-panda latin-panda commented May 22, 2025

I have verified this PR works in these browsers (latest versions):

  • Chrome
  • Firefox
  • Safari (macOS)
  • Safari (iOS)
  • Chrome for Android
  • Not applicable

What else has been done to verify that this works as intended?

NA

Why is this the best possible solution? Were any other approaches considered?

NA

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

NA

Do we need any specific form for testing your changes? If so, please attach one.

NA

What's changed

  • Adds guidelines for contributors
  • Adds lock file to /scripts
  • Adds engine info to package.json in /scripts
  • Adds data encryption to feature matrix

Copy link

changeset-bot bot commented May 22, 2025

⚠️ No Changeset found

Latest commit: d8b01be

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

README.md Outdated
- **Body**: Optional, lists specific changes (e.g., `- add geopoint.xml demo form`).
- **Footer**: Use `Co-authored-by: @<username>` or `BREAKING CHANGE:` for automation.

Our commit message format enables automated release management. This standard ensures commits are categorized to trigger appropriate version bumps:
Copy link
Member

Choose a reason for hiding this comment

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

All of this is managed by changeset so this section doesn't feel relevant. Changeset makes sense in our context because the version bumps aren't always the same across packages.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you see a benefit in having a format for commit messages?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I find that prefixes make the commit history easier to understand and scan visually. But I may be biased from using them for years

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It would be interesting to tag and publish the packages when the prep PR is merged, based on a commit:

release: pack version and publish

Copy link
Collaborator Author

@latin-panda latin-panda May 22, 2025

Choose a reason for hiding this comment

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

Note to myself - try this out later:

name: Tag packages for release

on:
  pull_request:
    types: [closed]
    branches:
      - main

jobs:
  tag-packages:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest
    steps:
      # Checkout the repository with full history
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          # Use a Personal Access Token to push tags (required for protected branches)
          token: ${{ secrets.PAT }}

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'

      - name: Check commit message
        id: check_commit
        run: |
          COMMIT_MESSAGE=$(git log --pretty=%B -1 ${{ github.event.pull_request.merge_commit_sha }})
          echo "Commit message: $COMMIT_MESSAGE"
          if echo "$COMMIT_MESSAGE" | grep -q "^release:"; then
            echo "Release commit detected"
            echo "is_release=true" >> $GITHUB_OUTPUT
          else
            echo "No release commit detected"
            echo "is_release=false" >> $GITHUB_OUTPUT
          fi

      - name: Configure git
        if: steps.check_commit.outputs.is_release == 'true'
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"

      - name: Tag packages
        if: steps.check_commit.outputs.is_release == 'true'
        run: |
          # Array of package directories
          PACKAGES=(
            "packages/web-forms"
            "packages/xforms-engine"
            "packages/xpath"
            "packages/tree-sitter-xpath"
          )

          for PKG in "${PACKAGES[@]}"; do
            NAME=$(node -p "require('./$PKG/package.json').name")
            VERSION=$(node -p "require('./$PKG/package.json').version")
            TAG="$NAME@$VERSION"

            if git tag | grep -Fx "$TAG"; then
              echo "Tag $TAG already exists, skipping..."
            else
              echo "Creating tag $TAG for $NAME"
              git tag "$TAG"
            fi
          done

          # Push all new tags
          git push origin --tags


Copy link
Member

Choose a reason for hiding this comment

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

I don't mind the prefixes and happy to follow your lead there as long as we keep changeset for versioning and changelog management for now. I like the future idea of automating tag and release!

Adds lock file to scrips
Adds data encryption to feature-matrix
@latin-panda latin-panda changed the title docs: adds commit guidelines docs: add contributor guidelines Jun 17, 2025
@latin-panda latin-panda changed the title docs: add contributor guidelines docs: adds guidelines for contributors Jun 17, 2025
@@ -433,14 +395,97 @@ We will be adding color and more styling soon. We intend to expose a way to do b
### In the ODK ecosystem

- [JavaRosa](https://github.com/getodk/javarosa) is the reference implementation for [ODK XForms](https://getodk.github.io/xforms-spec/). It powers the [Collect mobile application](https://github.com/getodk/collect/).
- [Enketo](https://github.com/enketo/enketo) is an ODK XForms web form application that has been maintained by the ODK team since 2021.
- [Enketo](https://github.com/enketo/enketo) is an ODK XForms web form application that was maintained by the ODK team from 2021 to 2024.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lognaturel is this okay?

@latin-panda latin-panda requested a review from lognaturel June 17, 2025 20:15
@latin-panda
Copy link
Collaborator Author

@lognaturel, when you have a chance, please review. It's a low priority, mostly documentation.

lognaturel
lognaturel previously approved these changes Jun 17, 2025
@lognaturel lognaturel dismissed their stale review June 17, 2025 21:09

Red build

@latin-panda
Copy link
Collaborator Author

New PRs are having the same error in the CI. I wonder if it's a temporary issue in GHA

@latin-panda latin-panda requested a review from lognaturel June 18, 2025 23:30
@latin-panda
Copy link
Collaborator Author

@lognaturel I think it was a temporary issue, now the CI is working fine for all PRs

@lognaturel
Copy link
Member

So weird, I wonder what happened?!

@latin-panda latin-panda merged commit 556f5cc into main Jun 18, 2025
47 checks passed
@latin-panda latin-panda deleted the commit-convention branch June 18, 2025 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants