diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 0000000..48d5f81 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,10 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..1df1087 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ +Fixes # + +### Changes proposed with this pull request: +- +- +- + +### Checklist +- [ ] Check the commit's or even all commits' message styles matches our requested structure. +- [ ] Check your code additions will fail neither code linting checks nor unit test. diff --git a/.github/workflows/use-github-apis.yml b/.github/workflows/use-github-apis.yml index 0b7d14c..038c5f1 100644 --- a/.github/workflows/use-github-apis.yml +++ b/.github/workflows/use-github-apis.yml @@ -32,7 +32,18 @@ jobs: run: echo "${{toJSON(steps.create-issue.outputs.result)}}" # Add here the close-issue step - + - uses: actions/github-script@v6 + id: close-issue + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const result = await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: ${{fromJSON(steps.create-issue.outputs.result).number}}, + state: 'closed' + }) + console.log(result) graphql-api-query-issues: needs: rest-api-create-and-close-issue @@ -66,6 +77,33 @@ jobs: # Add here the labels query step + graphql-api-query-labels: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + id: labels-result + with: + script: | + const query = `query($owner:String!, $name:String!) { + repository(owner:$owner, name:$name){ + labels (last:100) { + nodes { + name, + color, + issues(last:100) { + nodes { + number + } + } + } + } + } + }`; + const variables = { + owner: context.repo.owner, + name: context.repo.repo + } + const result = await github.graphql(query, variables) + console.log(result.repository.labels.nodes) - - \ No newline at end of file + diff --git a/README.md b/README.md index 7de5ea1..68a4801 100644 --- a/README.md +++ b/README.md @@ -69,4 +69,6 @@ ### InnerSource - [Manage an InnerSource program by using GitHub - Learn - Microsoft Docs](https://docs.microsoft.com/en-us/learn/modules/manage-innersource-program-github/) -- [An introduction to innersource - GitHub Resources](https://resources.github.com/innersource/fundamentals/) \ No newline at end of file +- [An introduction to innersource - GitHub Resources](https://resources.github.com/innersource/fundamentals/) + +### Articles & Guides