Commit Graph

72 Commits

Author SHA1 Message Date
Javi Martín
b51aa31e6a Use HTML beautifier to indent ERB files
We had inconsistent indentation in many places. Now we're fixing them
and adding a linter to our CI so we don't accidentally introduce
inconsistent indentations again.
2025-03-07 16:31:08 +01:00
taitus
94e70e9073 Rename executable deprecated erblint to erb_lint
Now executable `erblint` is deprecated, then we will use `erb_lint` instead.
2025-02-14 15:54:28 +01:00
Javi Martín
13481fdf32 Use Ubuntu 24.04 in our workflows
This is what github actions currently uses when using ubuntu-latest, and
what we recommend for new Consul Democracy installations.
2024-10-14 14:02:28 +02:00
Javi Martín
26ebe619e3 Use a specific version of Ubuntu in workflows
Using ubuntu-latest might result in incompatibilities when this image
changes to a different version of Ubuntu. For example, the Ubuntu 24.04
image no longer includes imagemagick, meaning that we'll have to install
it manually when using Ubuntu 24.04.
2024-10-14 13:47:30 +02:00
Javi Martín
1c68ad3a2a Use a maintained PostgreSQL version in Docker
We're using version 13 because it's the one included in Debian Bullseye,
which is the operating system we currently use in our Dockerfile.

For consistency, we're using the same version in GitHub Actions.

Note this image requires setting a password. Otherwise we get an error:

> Database is uninitialized and superuser password is not specified.
> You must specify POSTGRES_PASSWORD to a non-empty value for the
> superuser. For example, "-e POSTGRES_PASSWORD=password" on
> "docker run".

Since now we're setting a password in the postgres service, we also need
to provide the `PGPASSWORD` environment variable (or to specify the
password in the `database.yml` file, which we do for GitLab since it
uses a separate database configuration file). Otherwise we get an error:

```
PG::ConnectionBad: connection to server at "::1", port 5432 failed:
fe_sendauth: no password supplied (PG::ConnectionBad)
```
2024-09-18 15:44:50 +02:00
Javi Martín
0163ca88c3 Remove unneeded POSTGRES_HOST option in CI workflows
Not sure whether it was needed when we included it, but everything is
working fine without it.
2024-09-18 15:35:14 +02:00
dependabot[bot]
b211cd759b Bump docker/setup-buildx-action from 1 to 3
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-21 21:22:31 +00:00
Javi Martín
44c7e47dd4 Merge pull request #5618 from consuldemocracy/dependabot/github_actions/docker/build-push-action-6
Bump docker/build-push-action from 2 to 6
2024-07-21 23:21:13 +02:00
dependabot[bot]
3be475e582 Bump toshimaru/auto-author-assign from 1.4.0 to 2.1.1
Bumps [toshimaru/auto-author-assign](https://github.com/toshimaru/auto-author-assign) from 1.4.0 to 2.1.1.
- [Release notes](https://github.com/toshimaru/auto-author-assign/releases)
- [Changelog](https://github.com/toshimaru/auto-author-assign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/toshimaru/auto-author-assign/compare/v1.4.0...v2.1.1)

---
updated-dependencies:
- dependency-name: toshimaru/auto-author-assign
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-21 20:19:50 +00:00
dependabot[bot]
ca7c9f497a Bump docker/build-push-action from 2 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-21 20:19:44 +00:00
Javi Martín
2419084745 Don't add the ruby label to dependabot pull requests
The "ruby" label was redundant because most our dependencies are ruby
gems. We're still keeping the "javascript" dependencies for npm
dependencies, though.
2024-07-04 17:19:49 +02:00
Javi Martín
3c17de5435 Use dependabot to update github actions dependencies
This way we don't have to update them manually.
2024-07-04 17:19:49 +02:00
Javi Martín
bdcedafc8d Remove kanban management github action workflow
This workflow only supports classic projects [1], but we're migrating to
new projects because github will automatically close classic projects on
August 23 [2].

[1] Issue 89 in https://github.com/srggrs/assign-one-project-github-action/
[2] https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/
2024-07-02 15:30:02 +02:00
Javi Martín
df37ce69ab Check markdown rules in github actions
This way we'll notice syntax inconsistencies in pull requests. We
weren't doing it until now because there's no Pronto runner for MDL and
we weren't running linters individually.

Note we aren't checking the templates in the `.github` folders, since
these templates don't have a top level header in the beginning (they'll
be displayed on a page which already has a top level header) and MDL
doesn't provide a way to ignore certain rules on certain files. So we're
specifying which files to include instead of running `mdl .` (which
would also include the `node_modules` folder) or running `mdl -g .`
(which would exclude the `node_modules` folder but would include the
`.github` folder).
2024-06-21 16:46:51 +02:00
Javi Martín
819485eb80 Re-add and apply MDL rule MD040
We were following it about half of the time and we even added it to our
former `.mdlrc` file. However, for some reason, MDL doesn't detect this
rule when specified in the `.mdlrc` file, so we didn't notice we weren't
following it in many cases.

Now that we're using a style file to configure MDL, we can enable this
rule again and apply it, since now MDL correctly includes it in its
report.
2024-06-21 15:57:52 +02:00
Javi Martín
b0a29ca528 Apply rule MD034 Bare URL in github templates 2024-06-21 15:57:52 +02:00
Javi Martín
f59b0475b2 Adjust heading levels in github templates
Since the page contains an <h1> tag (the title of the issue), the main
headings of this file should be level 2 headings.

We're removing the "How" section in the flaky specs template for
simplicity (and because we usually don't use this template at all).

Note that MDL reports that the first heading should be a level 1
heading, but, as mentioned earlier, this doesn't make sense in the
context of a github issue. We'll probably exclude these files from MDL
checks in order to avoid this issue.
2024-06-21 15:57:52 +02:00
Javi Martín
b2d9d37070 Apply MDL spacing rules in github templates 2024-06-21 15:57:52 +02:00
Javi Martín
e2a8b3caae Fix linters workflow on Dependabot pull requests
The name of the actor is not dependabot but dependabot[bot] [1].

[1] https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#responding-to-events
2024-06-18 19:54:06 +02:00
Javi Martín
995f7036de Run every linter separately in Github Actions
The main reason for this change is that Pronto doesn't run in pull
requests opened by external contributors, and we haven't found how to
fix this issue.

Another reason is that Pronto only detects issues in the lines where the
changes are done, but sometimes we introduce issues related to other
lines and those aren't detected by Pronto. Also, when adding or changing
Rubocop rules, or when we update Rubocop, Pronto doesn't check whether
those rules are applied in every Ruby and ERB file, and we sometimes
forget to do so (particularly in ERB files).

So, from now, the linters will check all the code in every pull request.

Note we're now excluding the `vendor` folder in our linters because the
`setup-ruby` action actions generates a `vendor/bundle/` folder with all
our gem dependencies, and we don't want to check those files.
2024-06-18 19:11:55 +02:00
Javi Martín
61a6ba26b1 Simplify dependabot condition in pronto workflow
We had the `*` because, in the past, pull request could be opened by
either dependabot or dependabot-bot. That's no longer the case since we
started using dependabot v2.
2024-06-18 19:01:31 +02:00
Javi Martín
e646689535 Rename linters workflow to pronto
We're going to add a linters workflow, so the name would be confusing.
2024-06-18 18:27:32 +02:00
Javi Martín
baec41c43d Fix screenshots in GitHub Action when two jobs fail
The upload-artifact action does not support using the same artifact name
in different jobs (or in different matrix scenarios) since version 4,
which we started using in commit acfaada82. That meant that screenshots
were not uploaded correctly when two or more knapsack nodes failed.
2024-06-14 17:55:27 +02:00
Javi Martín
37c9e6bcde Update screenshots path in GitHub Actions
Since we upgraded to Rails 7.0 in commmit 8596f1539, the screenshots
started to be stored in `tmp/capybara`, so the step uploading
screenshots wasn't doing anything.
2024-06-14 17:50:54 +02:00
Javi Martín
e210682ac0 Replace SCSS Lint with Stylelint
SCSS Lint was based on Ruby Sass, which has been deprecated since 2018
and doesn't support some of the latest features in Dart Sass.

Since we're going to migrate to Dart Sass, we're also migrating to
Stylelint. In order to provide all the funcionality SCSS Lint had, we
also need to install a few Stylelint plugins. We also need to install
the `postcss-scss` package so Stylelint can read SCSS files.

We're still getting the linting errors we used to get in
`legislation_process.scss` because of the `max-nesting-depth` and
`selector-max-compound-selectors` rules, as well as the warnings we used
to get in `layout.scss` because the `ssb-whatsapp_app` HTML class
contains undescores in their name.

We're also getting a couple of new linting errors, which could be false
positives:

* The `scss/no-unused-private-members` rule reports errors in
  `_consul_settings.scss` because of the `$-zf-*` variables, but I'm not
  too worried about this one because these lines won't be necessary after
  updating Foundation.
* The `scss/selector-no-redundant-nesting-selector` reports an error in
  `datepicker_overrides.scss`, but removing the unnecessary nesting
  selector would make it harder to understand the code (assuming it'd
  work in the first place).

We've changed some files due to few differences between SCSS Lint rules
and their Stylelint equivalents:

* The `@stylistic/string-quotes` rule detects a case in `admin.scss`
  that StringQuotes didn't detect.
* The `function-url-quotes` rule detects a case in `mixins/icons.scss`
  that UrlQuotes didn't detect.
* The `@stylistic/declaration-bang-space-before` rule detects a case in
  `sdg/goals/show.scss` that BangFormat didn't detect.

There are also a couple of rules that don't behave exactly like they
used to:

* The equivalents of SpaceBetweenParens and SpaceAfterComma don't cover
  parenthesis or commas in mixin parameters; we haven't found rules that
  detect these cases.
* DisableLinterReason probably has an equivalent that behaves
  differently but, since we never disable linters inline, we aren't
  adding its equivalent rule.

Note we're removing the SpaceAfterVariableColon rule because its
equivalent, `scss/dollar-variable-colon-space-after`, reports cases
where we add spaces to indent several variable assignments (which we do
a lot in the `_consul_settings.scss` file). We might add this rule again
if we stop aligning consecutive assignments.

We're also removing the QualifyingElement rule because its equivalent,
`selector-no-qualifying-type: true`, behaves differently. For example,
in this code:

```
a.qualifying {
  color: inherit;
}

p {
  &.qualifying {
    color: inherit;
  }
}
```

With the QualifyingElement from SCSS Lint, the first rule is incorrect
but the second one is correct. With the selector-no-qualifying-type rule
from Stylelint, on the other hand, both rules are incorrect.

Personally, I never liked the QualifyingElement rule, and we were
working around it anyway, so we aren't applying
selector-no-qualifying-type.

For reference, here's a full list of the SCSS Lint rules we had enabled
and their Stylelint equivalents.

BangFormat
"@stylistic/declaration-bang-space-after": "never"
"@stylistic/declaration-bang-space-before": "always"

BorderZero
declaration-property-value-disallowed-list:
  border:
    - none

ColorKeyword
color-named: "never"

DebugStatement
at-rule-disallowed-list:
  - debug

DeclarationOrder
order/order:
  - dollar-variables
  - custom-properties
  - type: at-rule
    name: extend
  - type: at-rule
    name: include
    hasBlock: false
  - declarations
  - type: at-rule
    name: include
    hasBlock: true
  - rules

ElsePlacement # Apparently replaced by the combination of:
scss/at-else-closing-brace-space-after: always-intermediate
scss/at-else-empty-line-before: never
scss/at-if-closing-brace-space-after: always-intermediate
scss/at-if-closing-brace-newline-after: always-last-in-chain

EmptyLineBetweenBlocks:
  ignore_single_line_blocks: true
rule-empty-line-before:
  - "always-multi-line"
  - ignore:
    - after-comment
    - first-nested

EmptyRule:
block-no-empty: true

FinalNewline
"@stylistic/no-missing-end-of-source-newline": true

HexLength
color-hex-length: "short"

HexNotation
@stylistic/color-hex-case: "lower"

HexValidation
color-no-invalid-hex: true

IdSelector
selector-max-id: 0

ImportPath
scss/load-no-partial-leading-underscore: true
scss/at-import-partial-extension: never

Indentation
"@stylistic/indentation": 2

LeadingZero
@stylistic/number-leading-zero: "always"

NameFormat
scss/at-function-pattern: "^(-?[a-z][a-z0-9]*)(-[a-z0-9]+)*$"
scss/at-mixin-pattern: "^(-?[a-z][a-z0-9]*)(-[a-z0-9]+)*$"
scss/dollar-variable-pattern: "^(-?[a-z][a-z0-9]*)(-[a-z0-9]+)*$"
scss/percent-placeholder-pattern: "^(-?[a-z][a-z0-9]*)(-[a-z0-9]+)*$"

NestingDepth
max-nesting-depth: 4

PlaceholderInExtend
scss/at-extend-no-missing-placeholder: true

PrivateNamingConvention
scss/no-unused-private-members: true

PropertySpelling
property-no-unknown: true

PseudoElement
selector-pseudo-element-colon-notation: "double"
selector-pseudo-element-no-unknown: true

SelectorDepth
selector-max-compound-selectors: 5

SelectorFormat # Not always followed; ssb-whatsapp_app
custom-property-pattern: "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$"
selector-class-pattern: "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$"

Shorthand
shorthand-property-no-redundant-values: true

SingleLinePerProperty
"@stylistic/declaration-block-semicolon-newline-after": always-multi-line

SingleLinePerSelector
@stylistic/selector-list-comma-newline-after": always

SpaceAfterComma
"@stylistic/value-list-comma-space-after": always

SpaceAfterPropertyColon
"@stylistic/declaration-colon-space-after": always-single-line

SpaceAfterPropertyName
"@stylistic/declaration-colon-space-before": never

SpaceAfterVariableName
scss/dollar-variable-colon-space-before: never

SpaceAroundOperator
scss/operator-no-unspaced: true

SpaceBeforeBrace
@stylistic/block-opening-brace-space-before: always

SpaceBetweenParens
"@stylistic/function-parentheses-space-inside": never
"@stylistic/selector-attribute-brackets-space-inside": never
"@stylistic/selector-pseudo-class-parentheses-space-inside": never
"@stylistic/media-feature-parentheses-space-inside": never

StringQuotes
"@stylistic/string-quotes": double

TrailingSemicolon
"@stylistic/declaration-block-trailing-semicolon": always

TrailingWhitespace # Note it was enabled by the gem and not by us
"@stylistic/no-eol-whitespace": true

TrailingZero
"@stylistic/number-no-trailing-zeros": true

UnnecessaryMantissa
"@stylistic/number-no-trailing-zeros": true

UnnecessaryParentReference
scss/selector-no-redundant-nesting-selector: true

UrlQuotes
function-url-quotes: always

VendorPrefixes
value-no-vendor-prefix: true
selector-no-vendor-prefix: true
property-no-vendor-prefix: true
at-rule-no-vendor-prefix: true
media-feature-name-no-vendor-prefix: true

ZeroUnit:
length-zero-no-unit: true
2024-04-03 14:17:53 +02:00
Javi Martín
acfaada82b Update upload artifact action to version 4
We were getting a warning with version 3:

Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/upload-artifact@v3. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
2024-03-02 00:51:22 +01:00
Javi Martín
23e54892d5 Update setup-node action to version 4
We were getting a warning with version 3:

Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/setup-node@v3. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
2024-03-02 00:29:43 +01:00
Javi Martín
3fa16bc882 Update checkout action to version 4
We were getting some warnings with version 3:

Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/checkout@v3. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
2024-03-01 23:46:30 +01:00
Javi Martín
e07650e09b Update upload artifact action to version 3
We were getting a warning with version 2:

The following actions uses node12 which is deprecated and will be forced
to run on node16: actions/upload-artifact@v2. For more info:
https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
2024-03-01 23:11:39 +01:00
Javi Martín
b60d2f45b8 Update checkout action to version 3
We were getting a warning with version 2:

The following actions uses node12 which is deprecated and will be forced
to run on node16: actions/checkout@v2. For more info:
https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
2024-03-01 21:58:42 +01:00
Javi Martín
421cbe5441 Use dependabot to update NPM packages
Just like we do with gems.
2023-10-17 13:12:20 +02:00
Javi Martín
ad166fba4c Setup NPM with an empty package.json file
Note that, even if we're excluding the `node_modules/` folder from
version control, we aren't adding it to Capistrano's shared folders
because, when `node_modules` is a symbolic link, NPM removes it when
running `npm install`.
2023-10-17 13:12:20 +02:00
Javi Martín
55ed40e182 Depend on a specific version of Node.js
We're choosing version 18 because if offers support for SSL 3, just
like Ruby 3.1 does.

Note we're symlinking a .nvmrc file as well, in order to make it
compatible with NVM. While the .nvmrc and .node-version files use
different formats, they both support the syntax we're using to
define the version.

The code to install Node.js in the Dockerfile is a simplification of the
code in the Rails Dockerfile template [1].

[1] https://github.com/rails/rails/blob/04c97aec8a/railties/lib/rails/generators/rails/app/templates/Dockerfile.tt#L25
2023-10-17 13:11:58 +02:00
Javi Martín
40e920844b Update gem dependencies once a month
We originally set a daily interval because we hadn't updated our gem
dependencies for a year.

However, we usually wait a few days/weeks between the time a gem is
released and the moment we update it, and there are gems releasing new
versions every few days, so maintaining daily updates would become
tedious quickly.

So we're now doing it once a month. We're also increasing the limit of
open pull requests so we don't need to worry about whether dependabot is
opening pull requests for every dependency.
2023-09-12 16:20:49 +02:00
Javi Martín
58e8cf3ff3 Enable Dependabot again
We disabled Dependabot in commit a8d6b9b33 because it would
automatically create pull requests on every fork.

But since November 2022 Dependabot no longer behaves that way [1], so
now we can safely enable it without spamming every repository in our
community.

[1] https://github.blog/changelog/2022-11-07-dependabot-pull-requests-off-by-default-for-forks/
2023-08-18 14:57:29 +02:00
Javi Martín
629756dd15 Change URLs referencing our GitHub repositories 2023-07-12 16:05:26 +02:00
Javi Martín
c614b0bc97 Run test coverage just on the master branch
Since we changed the way we integrate coveralls in commit 8ed8cc8b9,
we're getting 6 additional checks displayed in our pull requests.

We don't need these checks, and they only add noise. The only reason we
use coveralls is to know the test coverage in our master branch.

So we're changing the code so coveralls only runs on the master branch.

There's also a chance that the test suite will be faster because it
doesn't need to keep track of the coverage, although I haven't noticed any
significant differences during my tests.

I haven't found a more elegant way to say that a certain step should
only be run on push on master, so I'm setting the environment variable
we were already using.
2023-03-04 01:29:03 +01:00
Javi Martín
4425f0f482 Merge pull request #4983 from sashashura/patch-1
GitHub Workflows security hardening
2023-03-01 17:41:23 +01:00
Javi Martín
8ed8cc8b93 Use Coveralls Github Action to send test reports
Coveralls stopped working back in July when we reached build number 3790
because back when we used Travis we created builds from numbers 3791 to
35700.

After trying to change the numbers in several ways, all of them
resulting in a "No build matching CI build number" message, we're trying
the Github Action provided by Coveralls instead. In order to make it
work, we need to add the `simplecov-lcov` gem and generate the report at
`coverage/lcov.info`. Note that, for some reason, `simplecov-lcov`
doesn't seem to depend on `simplecov` and we need `simplecov` 0.18 or
later, so we're manually adding this dependency as well.
2022-11-29 14:51:22 +01:00
Javi Martín
9da44a4538 Verify the schema.rb integrity when running our CI
In the past, we've run into situations where we commited a version of
the schema.rb to version control which wasn't in sync with what you get
when you create the database and run the migrations. This is something
that might happen if you're working on different branches at the same
time, run the migrations in all those branches, and then commit the
current status of your database to your current branch. That will result
in a schema file which contains the database changes done in all these
branches instead of just the current one.

Although this hasn't happened to us for years, we see it happening
sometimes in other COSUL installations, and there's always a chance that
we make a mistake and do it again.

Until now, it wasn't a big deal because the installer sets up the
database by running `db:create db:migrate`, which runs the migrations
instead of using the `schema.rb` file.

However, we're going to add multitenancy using the Aparment gem, and
this gem uses the `schema.rb` file when creating a new schema for a new
tenant [1]. If the `schema.rb` file contains changes that shouldn't be
there, this will lead to different database schemas having different
tables and/or columns and future migrations might crash on production
when applied to some of these schemas. In other words, this mistake
could now result in a disastrous situation.

To help preventing that, we're adding a CI workflow that checks the
current `schema.rb` file is in sync with the database migrations.

[1] https://medium.com/infinite-monkeys/our-multi-tenancy-journey-with-postgres-schemas-and-apartment-6ecda151a21f#7e97
2022-10-08 23:25:55 +02:00
Alex
bb52adec37 Update kanban.yml
repository-projects: write is not needed because secrets.KANBAN_TOKEN is used
2022-09-20 19:39:46 +01:00
Alex
40886704bb Update kanban.yml
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-08-29 20:07:04 +01:00
Senén Rodero Rodríguez
33d288f230 Use the latest available Ubuntu image to run tests
It is the Ubuntu 20.04 version at the time of writing.

Github Actions has deprecated the 18.04 we were using.
2022-08-22 17:10:33 +02:00
Javi Martín
f388e1f288 Merge pull request #4855 from turrisxyz/Pinned-Dependencies-GitHub
chore: Set permissions for GitHub actions
2022-08-03 22:15:27 +02:00
Javi Martín
4c25b20891 Assign pull request author automatically
We've been doing manually for too long ;).

The reason why we're assigning the author is it makes it easy to filter
pull requests by assignee on our kanban; it isn't so easy (actually,
might be impossible) to filter by author.
2022-07-07 14:43:04 +02:00
Javi Martín
b86c4ec100 Use a better name for the kanban workflow
The word "assign" was ambiguous, because it could have meant we were
assigning the author.

We were also displaying the same name twice.
2022-07-07 14:28:02 +02:00
Javi Martín
187e6ee1d6 Don't run kanban assignment on forks
Without this condition, the kanban assignment would be run on every
CONSUL fork and that would result in unpredictable results since they
would try to write on our kanban, and they don't have permission to do
so.

Note that, much to my dismay :D, the code only works if we use single
quotes in the name of the repository owner; it doesn't work if we use
double quotes.
2022-07-06 16:33:54 +02:00
nathannaveen
cac6194acd chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
2022-06-13 00:58:13 +00:00
Javi Martín
7015f41e3a Add kanban automation for new pull requests
So now, newly opened pull requests will automatically be added to the
"Reviewing" column, while newly opened draft pull requests will
automatically be added to the "Doing" column.

I've added the "reopened" event just in case (and was indeed very useful
while testing this feature), although we rarely reopen pull requests.

Note that this only works on pull requests that aren't already in the
project; that is, if a pull request is already in the "Doing" column,
closing it and reopening it will *not* move it to the "Reviewing
column".

So it looks like we won't easily be able to extend this feature in order
to automatically move pull requests when they're marked as ready for
review.
2022-06-08 15:49:03 +02:00
Javi Martín
a5eada79c0 Fix Pronto on Dependabot pull requests
As explained in "GitHub Actions: Workflows triggered by Dependabot PRs
will run with read-only permissions" [1], we need to consider Dependabot
pull requests as external pull requests.

[1] https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
2021-04-23 00:14:16 +02:00