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

Add an automatic commenter for new tooling PRs. #173

Merged
merged 2 commits into from
Oct 30, 2023
Merged

Conversation

Julian
Copy link
Member

@Julian Julian commented Oct 23, 2023

This workflow will comment on PRs that add new tools / implementations to the website. It will do so only on PR open (i.e. once), not whenever the PR is modified.

The goal is to direct implementers (or users submitting on their behalf) to review some resources that might be applicable to them.

We can of course grow or shrink this list as needed, if we wish to point to additional resources.

Right now, the way it detects which PRs are tool additions is by considering any PR which touches:

* the YAML files in the data directory
* the pages/implementations/main.md page

to be possible candidates.

Additional tweaks could be made to add or remove these triggers if the commenter is too noisy, or not noisy enough.

For PRs which touch these pages, this looks like:

Screenshot 2023-10-23 at 1 01 49 PM

PRs which do not meet the above detection are ignored.

Some further context on the immediate motivator of this is here.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 23, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c27b326
Status: ✅  Deploy successful!
Preview URL: https://2dbe2d34.website-2v2.pages.dev
Branch Preview URL: https://new-tooling-action.website-2v2.pages.dev

View logs

This workflow will comment on PRs that add new tools / implementations
to the website. It will do so only on PR open (i.e. once), not whenever
the PR is modified.

The goal is to direct implementers (or users submitting on their behalf)
to review some resources that might be applicable to them.

We can of course grow or shrink this list as needed, if we wish to point
to additional resources.

Right now, the way it detects which PRs are tool additions is
by considering any PR which touches:

    * the YAML files in the data directory
    * the pages/implementations/main.md page

to be possible candidates.

Additional tweaks could be made to add or remove these triggers if the
commenter is too noisy, or not noisy enough.
Copy link
Collaborator

@benjagm benjagm left a comment

Choose a reason for hiding this comment

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

This is great! And it opens the gate for more Github user's workflows which will be great.

Can I suggest adding a point inviting to join the implementers channel to connect with other fellow implementers?

@Julian
Copy link
Member Author

Julian commented Oct 23, 2023

Ooh, good idea, yes, adding.

@Julian
Copy link
Member Author

Julian commented Oct 30, 2023

@Relequestual will let you take a look in case you didn't see this one yet before merging in case you have any other things you can think of to add.

Copy link
Member

@Relequestual Relequestual left a comment

Choose a reason for hiding this comment

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

Thanks for this work!

@Julian Julian merged commit 38c2974 into main Oct 30, 2023
2 checks passed
@Julian Julian deleted the new-tooling-action branch October 30, 2023 15:01
Julian added a commit that referenced this pull request Nov 6, 2023
This doesn't *seem* like it should matter -- in that this workflow was
tested as-is on a different repository as part of building it, and ran
successfully. Furthermore, the docs for the permissions property in
GitHub (at https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)
say:

    You can use permissions either as a top-level key, to apply to all
    jobs in the workflow, or within specific jobs. When you add the
    permissions key within a specific job, all actions and run commands
    within that job that use the GITHUB_TOKEN gain the access rights you
    specify.

so, top-level seems like it's supposed to work fine.

And yet, in the "Set up job" step of #206, the permissions for
PullRequest are shown as:

    PullRequest: read

(https://github.com/json-schema-org/website/actions/runs/6762327321/job/18401399964?pr=206#step:1:18
though that link won't last forever).

Let's see at least if this changes that...

Refs: #173
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.

4 participants