GitXplorerGitXplorer
j

sync-task-issues

public
17 stars
1 forks
4 issues

Commits

List of commits on branch main.
Verified
f034948a3ca68a57354d6b86dd5ebe6245faee6c

Add deprecation notice to readme

jjonabc committed a year ago
Verified
dbb7ea675398a06c99e262b6d7a9592b75103449

Merge pull request #37 from jonabc/dependabot/npm_and_yarn/actions/core-1.9.1

jjonabc committed 2 years ago
Verified
5b91486edde07e8ac07f3178082db16fbd7a26c9

Bump @actions/core from 1.2.6 to 1.9.1

ddependabot[bot] committed 2 years ago
Verified
0481c16581da7f21de4d39a7e06557db399ab8e7

Merge pull request #33 from jonabc/dependabot/npm_and_yarn/ajv-6.12.6

jjonabc committed 2 years ago
Verified
a286ced5b9ecca69b633790203d46ce417d3f398

Merge pull request #36 from jonabc/dependabot/npm_and_yarn/node-fetch-2.6.7

jjonabc committed 2 years ago
Verified
a55982d0eef6d1b6e1f3799f71237037c4535112

Merge pull request #35 from jonabc/dependabot/npm_and_yarn/ansi-regex-4.1.1

jjonabc committed 2 years ago

README

The README file for this repository.

[DEPRECATED]

GitHub's native markdown task lists were updated since this action was originally created to perform the same behaviors. This action has been deprecated and will not receive any future changes.

javscript-action status

Mark references to issues and PRs as complete

This GH Action finds checkbox list item cross-references to an issue or pull request from an event and marks the references as complete.

This action uses the GitHub GraphQL API to find references, and updates each reference's body. The action looks for checkbox list items that are unchecked and marks them completed

- [ ] <any text>(url | #number)<any text>

becomes

- [x] <any text>(url | #number)<any text>

When an issue or PR which is referenced as a checkbox list item is reopened, the action will mark all references as incomplete.

- [x] <any text>(url | #number)<any text>

becomes

- [ ] <any text>(url | #number)<any text>

Usage

Create a YAML file in the .github/workflows folder of your repository with the following content:

name: Cross off linked issues
on:
  # the closed event type causes unchecked checkbox references to be checked / marked complete
  # the reopened event type causes checked checkbox references to be unchecked / marked incomplete
  issues:
    types: [closed, reopened]

  # the action works on pull request events as well
  pull_request:
    types: [closed, reopened]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Cross off any linked issue and PR references
        uses: jonabc/sync-task-issues@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

Required permissions

The default ${{ secrets.GITHUB_TOKEN }} token can be used only when both the closed issues or PRs and their references are in the same repo.

For cross-repo references, a personal access token with repo access is needed from a user account that can write to the all repositories containing references.

Inputs

  • github_token: the token to use for authenticated GitHub API requests
  • state: explicitly configure whether to mark references as complete or incomplete when the action is triggered
    • accepts either complete and incomplete

Outputs

  • mark_references_as: Either complete or incomplete, showing how references were marked by the action
  • references: The list of objects obtained from the GitHub API that referenced the current issue or PR
    • output using JSON.stringify, ex. [{ ... reference 1 }, { ... reference 2 }]
    • see graphql.js#fields for which data fields are fetched from the API
  • updated: A list of ${type}:${id} strings that identify which objects from references were updated
    • output using JSON.stringify, ex. ["Issue:1", "PullRequest:2"]